summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti/cpsw-common.c
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2015-09-21 15:56:51 +0530
committerDavid S. Miller <davem@davemloft.net>2015-09-21 17:21:46 -0700
commitd230a11abc97e118365b12a472ff758d867c4bac (patch)
treeaa7b9da827cd94e0ca75cc3ab417ea2377f533fd /drivers/net/ethernet/ti/cpsw-common.c
parentb6745f6e4e63f23fd5bf46ea2745783be13a0960 (diff)
drivers: net: cpsw-common: add support for reading mac address for dra7 and am437x platforms
Adding support for reading mac address using syscon driver for dra7 and am437x platforms Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw-common.c')
-rw-r--r--drivers/net/ethernet/ti/cpsw-common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw-common.c b/drivers/net/ethernet/ti/cpsw-common.c
index c70417ce0a8b..c08be62bceba 100644
--- a/drivers/net/ethernet/ti/cpsw-common.c
+++ b/drivers/net/ethernet/ti/cpsw-common.c
@@ -87,6 +87,12 @@ int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr)
if (of_device_is_compatible(dev->of_node, "ti,dm816-emac"))
return cpsw_am33xx_cm_get_macid(dev, 0x30, slave, mac_addr);
+ if (of_machine_is_compatible("ti,am4372"))
+ return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr);
+
+ if (of_machine_is_compatible("ti,dra7"))
+ return davinci_emac_3517_get_macid(dev, 0x514, slave, mac_addr);
+
dev_err(dev, "incompatible machine/device type for reading mac address\n");
return -ENOENT;
}