From 8869a8883be80e1430da09095147b795848e6ba9 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 31 May 2023 00:51:21 +0200 Subject: [PATCH] net: ethoc: Switch to new U-Boot PHY API Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut Reviewed-by: Ramon Fried --- drivers/net/ethoc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 29067e9e94..13fad8119b 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -608,18 +608,16 @@ static int ethoc_mdio_init(const char *name, struct ethoc *priv) static int ethoc_phy_init(struct ethoc *priv, void *dev) { struct phy_device *phydev; - int mask = 0xffffffff; + int mask = -1; #ifdef CONFIG_PHY_ADDR - mask = 1 << CONFIG_PHY_ADDR; + mask = CONFIG_PHY_ADDR; #endif - phydev = phy_find_by_mask(priv->bus, mask); + phydev = phy_connect(priv->bus, mask, dev, PHY_INTERFACE_MODE_MII); if (!phydev) return -ENODEV; - phy_connect_dev(phydev, dev, PHY_INTERFACE_MODE_MII); - phydev->supported &= PHY_BASIC_FEATURES; phydev->advertising = phydev->supported; -- 2.39.5