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>
This commit is contained in:

committed by
David S. Miller

parent
342b7b741d
commit
d755998270
@@ -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);
|
||||
|
Reference in New Issue
Block a user