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

index 912d28fca2e2b21ed779d88898d05fe1b7dd20ad..e2340936fa62dd6f819a422aba290405e916b94d 100644 (file)
@@ -430,17 +430,11 @@ static int tse_mdio_init(const char *name, struct altera_tse_priv *priv)
 static int tse_phy_init(struct altera_tse_priv *priv, void *dev)
 {
        struct phy_device *phydev;
-       unsigned int mask = 0xffffffff;
 
-       if (priv->phyaddr)
-               mask = 1 << priv->phyaddr;
-
-       phydev = phy_find_by_mask(priv->bus, mask);
+       phydev = phy_connect(priv->bus, -1, dev, priv->interface);
        if (!phydev)
                return -ENODEV;
 
-       phy_connect_dev(phydev, dev, priv->interface);
-
        phydev->supported &= PHY_GBIT_FEATURES;
        phydev->advertising = phydev->supported;