summaryrefslogtreecommitdiff
path: root/include/cpsw.h
diff options
context:
space:
mode:
authorFaiz Abbas <faiz_abbas@ti.com>2019-03-18 13:54:34 +0530
committerTom Rini <trini@konsulko.com>2019-04-12 08:05:53 -0400
commita58d222df9be560e7fdba0300ca57b02b1362ded (patch)
tree8048564b0f4fd796276b4d6e406798025693e95e /include/cpsw.h
parentf32a816c26d8746668457733440474ee98e256ef (diff)
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>
Diffstat (limited to 'include/cpsw.h')
-rw-r--r--include/cpsw.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/cpsw.h b/include/cpsw.h
index 55db277e73..0023151bc0 100644
--- a/include/cpsw.h
+++ b/include/cpsw.h
@@ -51,10 +51,15 @@ struct cpsw_platform_data {
bool rmii_clock_external;
u8 version;
const char *phy_sel_compat;
+ u32 syscon_addr;
+ const char *macid_sel_compat;
};
int cpsw_register(struct cpsw_platform_data *data);
-int ti_cm_get_macid(struct udevice *dev, int slave, u8 *mac_addr);
+int ti_cm_get_macid_addr(struct udevice *dev, int slave,
+ struct cpsw_platform_data *data);
+void ti_cm_get_macid(struct udevice *dev, struct cpsw_platform_data *data,
+ u8 *mac_addr);
int cpsw_get_slave_phy_addr(struct udevice *dev, int slave);
#endif /* _CPSW_H_ */