arm: ti: cpsw: Check the new slave node address

Since DTS from >= Linux 5.0 the slave address are relative to the parent
node address and aren't the full ones.
Check both so the cpsw driver can find the phy id.
This commit is contained in:
manu 2019-07-29 10:42:15 +00:00
parent 9c02e2074c
commit 4494af5d29

View File

@ -755,7 +755,9 @@ cpsw_get_fdt_data(struct cpsw_softc *sc, int port)
continue;
}
OF_prop_free(name);
if (mdio_child_addr != slave_mdio_addr[port])
if (mdio_child_addr != slave_mdio_addr[port] &&
mdio_child_addr != (slave_mdio_addr[port] & 0xFFF))
continue;
if (fdt_get_phyaddr(child, NULL, &phy, NULL) != 0){