aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethoc.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-06-10 14:08:00 -0400
committerTom Rini <trini@konsulko.com>2023-06-10 14:08:00 -0400
commit5b589e139620214f26eb83c9fb7bbd62b5f8fc1d (patch)
tree148aefb39e8e2dac86b475ef4b9e77c26760ef9f /drivers/net/ethoc.c
parentcc5a94092317dfd275d18fdcf5884d5d4e4f2c09 (diff)
parent32d2461e0467b50abeb5662fce41fdd686e88b61 (diff)
Merge branch 'next_net/phy_connect_dev' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
Diffstat (limited to 'drivers/net/ethoc.c')
-rw-r--r--drivers/net/ethoc.c8
1 files changed, 3 insertions, 5 deletions
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;