diff options
| author | Marek Vasut <[email protected]> | 2017-07-21 23:20:34 +0200 |
|---|---|---|
| committer | Nobuhiro Iwamatsu <[email protected]> | 2017-08-03 04:26:25 +0900 |
| commit | e821a7bdb13435eace82e907363dc59be56f139a (patch) | |
| tree | d6a537a60336433ba4372a0f32247fcd977ab189 /drivers | |
| parent | 5ee8b4d7f5e52e2ace15ca6bfbb35593d908af0f (diff) | |
net: ravb: Detect PHY correctly
The order of parameters passed to the phy_connect() was wrong.
Moreover, only PHY address 0 was used. Replace this with code
capable of detecting the PHY address.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Joe Hershberger <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/ravb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 7f0e2568b76..ce0eacceb60 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -298,13 +298,14 @@ static int ravb_phy_config(struct udevice *dev) struct ravb_priv *eth = dev_get_priv(dev); struct eth_pdata *pdata = dev_get_platdata(dev); struct phy_device *phydev; - int reg; + int mask = 0xffffffff, reg; - phydev = phy_connect(eth->bus, pdata->phy_interface, - dev, PHY_INTERFACE_MODE_RGMII_ID); + phydev = phy_find_by_mask(eth->bus, mask, pdata->phy_interface); if (!phydev) return -ENODEV; + phy_connect_dev(phydev, dev); + eth->phydev = phydev; /* 10BASE is not supported for Ethernet AVB MAC */ |
