Skip to content
Snippets Groups Projects
Commit b2003c54 authored by Mugunthan V N's avatar Mugunthan V N Committed by Joe Hershberger
Browse files

drivers: net: cpsw: fix cpsw dp parse when num slaves as 1


On some boards number of slaves can be 1 when only one port
ethernet is pinned out. So do not break when slave_index and
num slaves check fails, instead continue to parse the next
child.

Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger's avatarJoe Hershberger <joe.hershberger@ni.com>
parent 3d12e804
No related branches found
No related tags found
No related merge requests found
......@@ -1209,10 +1209,8 @@ static int cpsw_eth_ofdata_to_platdata(struct udevice *dev)
if (!strncmp(name, "slave", 5)) {
u32 phy_id[2];
if (slave_index >= priv->data.slaves) {
printf("error: num slaves and slave nodes did not match\n");
return -EINVAL;
}
if (slave_index >= priv->data.slaves)
continue;
phy_mode = fdt_getprop(fdt, subnode, "phy-mode", NULL);
if (phy_mode)
priv->data.slave_data[slave_index].phy_if =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment