提交 e821a7bd 编写于 作者: M Marek Vasut 提交者: Nobuhiro Iwamatsu

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: NMarek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
Signed-off-by: NNobuhiro Iwamatsu <iwamatsu@nigauri.org>
上级 5ee8b4d7
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册