aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2022-04-07 00:33:07 +0200
committerRamon Fried <ramon@neureality.ai>2022-04-10 08:44:13 +0300
commitb638814e91f772beb1c05e4d04cf6513ac37af59 (patch)
treeda90717a6dec821db91f25881efad176715ba66a /drivers
parent79bef5fb1f0ce6b090017d2525a42f94e1577673 (diff)
downloadu-boot-b638814e91f772beb1c05e4d04cf6513ac37af59.zip
u-boot-b638814e91f772beb1c05e4d04cf6513ac37af59.tar.gz
u-boot-b638814e91f772beb1c05e4d04cf6513ac37af59.tar.bz2
bcmgenet, sun8i_emac: Don't connect PHY two times
The bcmgenet and sun8i_emac drivers call phy_connect(), which finds / creates the PHY and also connects it to the eth device via phy_connect_dev(), then set some phydev members (bcmgenet only), and then call phy_connect_dev() explicitly again. Drop the second phy_connect_dev(), since it is unnecesary. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bcmgenet.c2
-rw-r--r--drivers/net/sun8i_emac.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index ef321f2..4e1f8ed 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -526,8 +526,6 @@ static int bcmgenet_phy_init(struct bcmgenet_eth_priv *priv, void *dev)
}
phydev->advertising = phydev->supported;
- phy_connect_dev(phydev, dev);
-
priv->phydev = phydev;
phy_config(priv->phydev);
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 5943a5e..906a8ec 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -391,8 +391,6 @@ static int sun8i_phy_init(struct emac_eth_dev *priv, void *dev)
if (!phydev)
return -ENODEV;
- phy_connect_dev(phydev, dev);
-
priv->phydev = phydev;
phy_config(priv->phydev);