Commit Graph

7 Commits

Author SHA1 Message Date
Faiz Abbas
c3b460a516 net: ti: cpsw: Block off ofdata_to_platdata with OF_CONTROL
The ofdata_to_platdata function should not be called if OF_CONTROL is
not enabled because fdtdec_* calls will fail. Block the function with
OF_CONTROL

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-04-12 08:05:53 -04:00
Faiz Abbas
a58d222df9 net: ti: cpsw-common: Isolate getting syscon address from assigning macid
ti_cm_get_macid() is used to get a syscon node from the dt, read the
efuse address and then assign the macid read from the address. Divide
these two steps into separate functions one of which can be called from
ofdata_to_platdata() while the other can be called from _probe(). This
ensures that platdata can be assigned statically in a board file when
OF_CONTROL is not enabled. Also add a macid_sel_compat in private data
to get information about the macid byte placement.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-04-12 08:05:53 -04:00
Faiz Abbas
f32a816c26 net: ti: cpsw: Convert cpsw_platform_data to a pointer in cpsw_priv
Convert cpsw_platform_data to a pointer in cpsw_priv. Allocate it
dynamically and assign it as a part of eth_pdata. This helps in
isolating platform data handling and implementing platdata for SPL
in a board file.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-04-12 08:05:53 -04:00
Faiz Abbas
e50f878c98 net: ti: cpsw: Move cpsw_phy_sel() to _probe()
cpsw_phy_sel() is a configuration step that should not be in
ofdata_to_platdata(). Add phy_sel_compat to the cpsw_platform_data
structure so that it is accessible in _probe. Then move the call of
cpsw_phy_sel() to _probe.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-04-12 08:05:52 -04:00
Grygorii Strashko
4f41cd9a95 driver: net: ti: cpsw: switch to use common mdio lib
Update TI CPSW driver to re-use common mdio lib

Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2018-11-05 10:42:01 -06:00
Grygorii Strashko
cbec53b434 driver: net: ti: cpsw: update to use SPDX identifier
Update to use SPDX license identifier.

Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2018-11-05 10:42:00 -06:00
Grygorii Strashko
ffad5fa0cd driver: net: consolidate ti's code in separate folder
Add drivers/net/ti/ folder and move all TI's code in this folder for better
maintenance.

Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2018-11-05 10:41:59 -06:00