mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-24 12:11:28 +01:00
net: ethoc: Switch to new U-Boot PHY API
Use new U-Boot phy_connect() API which also supports fixed PHYs. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
parent
7ff881a69f
commit
8869a8883b
@ -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)
|
static int ethoc_phy_init(struct ethoc *priv, void *dev)
|
||||||
{
|
{
|
||||||
struct phy_device *phydev;
|
struct phy_device *phydev;
|
||||||
int mask = 0xffffffff;
|
int mask = -1;
|
||||||
|
|
||||||
#ifdef CONFIG_PHY_ADDR
|
#ifdef CONFIG_PHY_ADDR
|
||||||
mask = 1 << CONFIG_PHY_ADDR;
|
mask = CONFIG_PHY_ADDR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
phydev = phy_find_by_mask(priv->bus, mask);
|
phydev = phy_connect(priv->bus, mask, dev, PHY_INTERFACE_MODE_MII);
|
||||||
if (!phydev)
|
if (!phydev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
phy_connect_dev(phydev, dev, PHY_INTERFACE_MODE_MII);
|
|
||||||
|
|
||||||
phydev->supported &= PHY_BASIC_FEATURES;
|
phydev->supported &= PHY_BASIC_FEATURES;
|
||||||
phydev->advertising = phydev->supported;
|
phydev->advertising = phydev->supported;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user