drivers: net: cpsw-common: add support for reading mac address for dra7 and am437x...
authorMugunthan V N <mugunthanvnm@ti.com>
Mon, 21 Sep 2015 10:26:51 +0000 (15:56 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Sep 2015 00:21:46 +0000 (17:21 -0700)
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>
drivers/net/ethernet/ti/cpsw-common.c

index c70417c..c08be62 100644 (file)
@@ -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;
 }