Message ID | 20230530225131.949721-3-marek.vasut+renesas@mailbox.org |
---|---|
State | Accepted |
Commit | 7ff881a69f4fb19086fc2d84cd302dd1e2eab0ed |
Delegated to: | Ramon Fried |
Headers | show |
Series | [01/14] net: eth-phy: staticize eth_phy_reset() | expand |
On Wed, May 31, 2023 at 1:51 AM Marek Vasut <marek.vasut+renesas@mailbox.org> wrote: > > Use new U-Boot phy_connect() API which also supports fixed PHYs. > > Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> > --- > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > Cc: Joe Hershberger <joe.hershberger@ni.com> > Cc: Michal Simek <michal.simek@amd.com> > Cc: Nishanth Menon <nm@ti.com> > Cc: Ramon Fried <rfried.dev@gmail.com> > --- > drivers/net/sni_ave.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c > index 014b070d9e5..f5a0d80af7a 100644 > --- a/drivers/net/sni_ave.c > +++ b/drivers/net/sni_ave.c > @@ -391,14 +391,12 @@ static int ave_mdiobus_init(struct ave_private *priv, const char *name) > static int ave_phy_init(struct ave_private *priv, void *dev) > { > struct phy_device *phydev; > - int mask = GENMASK(31, 0), ret; > + int ret; > > - phydev = phy_find_by_mask(priv->bus, mask); > + phydev = phy_connect(priv->bus, -1, dev, priv->phy_mode); > if (!phydev) > return -ENODEV; > > - phy_connect_dev(phydev, dev, priv->phy_mode); > - > phydev->supported &= PHY_GBIT_FEATURES; > if (priv->max_speed) { > ret = phy_set_supported(phydev, priv->max_speed); > -- > 2.39.2 > Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c index 014b070d9e5..f5a0d80af7a 100644 --- a/drivers/net/sni_ave.c +++ b/drivers/net/sni_ave.c @@ -391,14 +391,12 @@ static int ave_mdiobus_init(struct ave_private *priv, const char *name) static int ave_phy_init(struct ave_private *priv, void *dev) { struct phy_device *phydev; - int mask = GENMASK(31, 0), ret; + int ret; - phydev = phy_find_by_mask(priv->bus, mask); + phydev = phy_connect(priv->bus, -1, dev, priv->phy_mode); if (!phydev) return -ENODEV; - phy_connect_dev(phydev, dev, priv->phy_mode); - phydev->supported &= PHY_GBIT_FEATURES; if (priv->max_speed) { ret = phy_set_supported(phydev, priv->max_speed);
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> --- Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Michal Simek <michal.simek@amd.com> Cc: Nishanth Menon <nm@ti.com> Cc: Ramon Fried <rfried.dev@gmail.com> --- drivers/net/sni_ave.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)