]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: tsec: Use dm_eth_phy_connect() directly for the DM case
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 14 Mar 2021 12:14:56 +0000 (20:14 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Thu, 15 Apr 2021 08:52:17 +0000 (14:22 +0530)
Now that the fixed phy driver has been fully adapted to OF APIs,
and dm_eth_phy_connect() already can handle the fixed phy, call
dm_eth_phy_connect() directly in the DM tsec driver.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20210216224804.3355044-4-olteanv@gmail.com>
[bmeng: split from "net: mdio: teach dm_eth_phy_connect to connect to fixed PHY"]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/net/tsec.c

index ec486893725753a84425641c5bfa4ac609b2909b..f801d020fb658367a55f47f28cbf7a62964a6da4 100644 (file)
@@ -707,11 +707,7 @@ static int init_phy(struct tsec_private *priv)
                tsec_configure_serdes(priv);
 
 #if defined(CONFIG_DM_ETH) && defined(CONFIG_DM_MDIO)
-       if (ofnode_valid(ofnode_find_subnode(dev_ofnode(priv->dev),
-                                            "fixed-link")))
-               phydev = phy_connect(NULL, 0, priv->dev, priv->interface);
-       else
-               phydev = dm_eth_phy_connect(priv->dev);
+       phydev = dm_eth_phy_connect(priv->dev);
 #else
        phydev = phy_connect(priv->bus, priv->phyaddr, priv->dev,
                             priv->interface);