]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
drivers: net: cpsw: fix phy dt node setting
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 5 Jul 2018 17:02:51 +0000 (12:02 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 26 Jul 2018 19:08:23 +0000 (14:08 -0500)
Now CPSW driver will overwrite UCLASS_ETH node when PHY is
connected and configured which is not correct.
Use struct phydev->node instead.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/cpsw.c

index 9919d3919fafda77a0bcc399cfe670a5e5215fcf..c31695eba9dd4c97df4bf704edaf532724570770 100644 (file)
@@ -999,7 +999,7 @@ static int cpsw_phy_init(struct cpsw_priv *priv, struct cpsw_slave *slave)
 
 #ifdef CONFIG_DM_ETH
        if (slave->data->phy_of_handle)
-               dev_set_of_offset(phydev->dev, slave->data->phy_of_handle);
+               phydev->node = offset_to_ofnode(slave->data->phy_of_handle);
 #endif
 
        priv->phydev = phydev;