]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: pch_gbe: Switch to new U-Boot PHY API
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 30 May 2023 22:51:22 +0000 (00:51 +0200)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 10 Jun 2023 11:34:05 +0000 (13:34 +0200)
Use new U-Boot phy_connect() API which also supports fixed PHYs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/pch_gbe.c

index ad7b5b8e99b7a5a3f33dc29c6538bf31daff25ce..ecf8c28fe41b82d33df88bb04dc8ae730a589e99 100644 (file)
@@ -414,16 +414,13 @@ static int pch_gbe_phy_init(struct udevice *dev)
        struct pch_gbe_priv *priv = dev_get_priv(dev);
        struct eth_pdata *plat = dev_get_plat(dev);
        struct phy_device *phydev;
-       int mask = 0xffffffff;
 
-       phydev = phy_find_by_mask(priv->bus, mask);
+       phydev = phy_connect(priv->bus, -1, dev, plat->phy_interface);
        if (!phydev) {
                printf("pch_gbe: cannot find the phy\n");
                return -1;
        }
 
-       phy_connect_dev(phydev, dev, plat->phy_interface);
-
        phydev->supported &= PHY_GBIT_FEATURES;
        phydev->advertising = phydev->supported;