net: mvneta: Use DM MDIO API for connecting PHY
Use the modern DM MDIO API for connecting PHY in the mvneta driver. This requires enabling MVMDIO driver in several config files. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
committed by
Stefan Roese
parent
47f0e8e21a
commit
da84e409df
@@ -1571,16 +1571,15 @@ static int mvneta_start(struct udevice *dev)
|
||||
|
||||
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
|
||||
} else {
|
||||
/* Set phy address of the port */
|
||||
mvreg_write(pp, MVNETA_PHY_ADDR, pp->phyaddr);
|
||||
|
||||
phydev = phy_connect(pp->bus, pp->phyaddr, dev,
|
||||
pp->phy_interface);
|
||||
phydev = dm_eth_phy_connect(dev);
|
||||
if (!phydev) {
|
||||
printf("phy_connect failed\n");
|
||||
printf("dm_eth_phy_connect failed\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Set PHY address in case we will enable HW polling */
|
||||
mvreg_write(pp, MVNETA_PHY_ADDR, phydev->addr);
|
||||
|
||||
pp->phydev = phydev;
|
||||
phy_config(phydev);
|
||||
phy_startup(phydev);
|
||||
|
||||
Reference in New Issue
Block a user