diff options
author | Mugunthan V N <mugunthanvnm@ti.com> | 2015-09-21 13:26:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-22 03:21:46 +0300 |
commit | b6745f6e4e63f23fd5bf46ea2745783be13a0960 (patch) | |
tree | 4555db378617670ae03988fc934aacc7defde94b /drivers/net/ethernet/ti/cpsw.c | |
parent | 607cba1554cbdfd8d9f4a645f235e1dc909ba33f (diff) | |
download | linux-b6745f6e4e63f23fd5bf46ea2745783be13a0960.tar.xz |
drivers: net: cpsw: davinci_emac: move reading mac id to common file
Moving mac address reading from ethernet driver to common
file for better maintenance and for code reusable.
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.c')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index c670317f3cb0..75584cc36339 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2058,13 +2058,10 @@ no_phy_slave: if (mac_addr) { memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN); } else { - if (of_machine_is_compatible("ti,am33xx")) { - ret = cpsw_am33xx_cm_get_macid(&pdev->dev, - 0x630, i, - slave_data->mac_addr); - if (ret) - return ret; - } + ret = ti_cm_get_macid(&pdev->dev, i, + slave_data->mac_addr); + if (ret) + return ret; } if (data->dual_emac) { if (of_property_read_u32(slave_node, "dual_emac_res_vlan", |