diff options
author | Tom Rini <trini@konsulko.com> | 2019-06-02 08:33:10 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-06-02 08:33:10 -0400 |
commit | 55cae6458d51294f4ded1d9d2339dfed5afa90ed (patch) | |
tree | 8008cdd498bfb685bb8c0ecde7c47a9db45fab41 /cmd | |
parent | 8a802a2eefd36865eaa3d927d1db7af63bb2d922 (diff) | |
parent | b4c20f20adad8d246b95be5bebacb730462c8c01 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-net
- Basic bug fixes and minor features for 2019.07.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mdio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/mdio.c b/cmd/mdio.c index efe8c9ef09..5e219f699d 100644 --- a/cmd/mdio.c +++ b/cmd/mdio.c @@ -54,7 +54,10 @@ static int mdio_write_ranges(struct mii_dev *bus, for (devad = devadlo; devad <= devadhi; devad++) { for (reg = reglo; reg <= reghi; reg++) { - if (!extended) + if (!phydev) + err = bus->write(bus, addr, devad, + reg, data); + else if (!extended) err = phy_write_mmd(phydev, devad, reg, data); else @@ -88,7 +91,9 @@ static int mdio_read_ranges(struct mii_dev *bus, for (reg = reglo; reg <= reghi; reg++) { int val; - if (!extended) + if (!phydev) + val = bus->read(bus, addr, devad, reg); + else if (!extended) val = phy_read_mmd(phydev, devad, reg); else val = phydev->drv->readext(phydev, addr, |