summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2012-09-26 07:24:27 +0000
committerDavid S. Miller <davem@davemloft.net>2012-10-01 17:10:55 -0400
commitd7559982701ac500662b2e8e150ff34f7faf0281 (patch)
treecd731653972e45649b1b13bb1b82d9602c152208 /drivers
parent342b7b741d76bc8aadeff844634348bb2a343d19 (diff)
net: ti cpsw ethernet: allow reading phy interface mode from DT
Allow users to specify the phy interface of the CPSW slaves. The new node parameter is called "phy_if_mode" and is optional. The original behaviour of the driver is preserved when not given. Signed-off-by: Daniel Mack <zonque@gmail.com> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: Vaibhav Hiremath <hvaibhav@ti.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/ti/cpsw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index df55e2403746..3e12db6f9c0c 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -855,6 +855,9 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
slave_data->sliver_reg_ofs = prop;
+ if (!of_property_read_u32(slave_node, "phy_if_mode", &prop))
+ slave_data->phy_if = prop;
+
mac_addr = of_get_mac_address(slave_node);
if (mac_addr)
memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN);