]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: sh_eth: Switch to new U-Boot PHY API
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 30 May 2023 22:51:23 +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/sh_eth.c

index 8f162ca58fbb53cb6c6210e4f955681d41058872..14f7fd1bcc0d94c8a0d81cb3991588f4f40dcea9 100644 (file)
@@ -601,14 +601,11 @@ static int sh_eth_phy_config(struct udevice *dev)
        int ret = 0;
        struct sh_eth_info *port_info = &eth->port_info[eth->port];
        struct phy_device *phydev;
-       int mask = 0xffffffff;
 
-       phydev = phy_find_by_mask(priv->bus, mask);
+       phydev = phy_connect(priv->bus, -1, dev, pdata->phy_interface);
        if (!phydev)
                return -ENODEV;
 
-       phy_connect_dev(phydev, dev, pdata->phy_interface);
-
        port_info->phydev = phydev;
        phy_config(phydev);