[PATCH v4 12/22] net: tsec: Use dm_eth_phy_connect() directly for the DM case

Bin Meng bmeng.cn at gmail.com
Sun Mar 14 13:14:56 CET 2021


From: Vladimir Oltean <vladimir.oltean at nxp.com>

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 at nxp.com>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Tested-by: Bin Meng <bmeng.cn at gmail.com>
Message-Id: <20210216224804.3355044-4-olteanv at gmail.com>
[bmeng: split from "net: mdio: teach dm_eth_phy_connect to connect to fixed PHY"]
Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean at nxp.com>

---

(no changes since v2)

Changes in v2:
- new patch: split from <20210216224804.3355044-4-olteanv at gmail.com>

 drivers/net/tsec.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index ec48689372..f801d020fb 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -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);
-- 
2.25.1



More information about the U-Boot mailing list