From: Marek Vasut Date: Tue, 30 May 2023 22:51:21 +0000 (+0200) Subject: net: ethoc: Switch to new U-Boot PHY API X-Git-Tag: v2025.01-rc5-pxa1908~950^2~19^2~12 X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=8869a8883be80e1430da09095147b795848e6ba9;p=u-boot.git 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 --- 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;