mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
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 <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
5ee8b4d7f5
commit
e821a7bdb1
1 changed files with 4 additions and 3 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue