diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-11-16 08:41:01 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-12-02 14:36:02 +0100 |
commit | 15a2acdf850e86cd0ae8dfc80d49c89727bac09b (patch) | |
tree | ed621f2dd57f951f51eea9c2a36490ccaa7558f8 /common/miiphyutil.c | |
parent | 20ca67900f1997358047c03bb6034b1cde01894e (diff) | |
download | u-boot-15a2acdf850e86cd0ae8dfc80d49c89727bac09b.tar.gz u-boot-15a2acdf850e86cd0ae8dfc80d49c89727bac09b.tar.bz2 u-boot-15a2acdf850e86cd0ae8dfc80d49c89727bac09b.zip |
common: miiphyutil: Work and report phy address in hex in mdio cmd
It is confusing that mdio commands work and report phy id as
decimal value when mii is working with hex values.
For example:
ZynqMP> mdio list
gem:
21 - TI DP83867 <--> ethernet@ff0e0000
ZynqMP> mdio read ethernet@ff0e0000 0
Reading from bus gem
PHY at address 21:
0 - 0x1140
ZynqMP> mii dump 21 0
Incorrect PHY address. Range should be 0-31
...
ZynqMP> mii dump 15
0. (1140) -- PHY control register --
(8000:0000) 0.15 = 0 reset
U-Boot normally takes hex values that's why this patch is changing mdio
command to handle hex instead of changing mii command to handle decimal
values.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'common/miiphyutil.c')
-rw-r--r-- | common/miiphyutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index d8ebb384db..aca18db52a 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -135,7 +135,7 @@ void mdio_list_devices(void) struct phy_device *phydev = bus->phymap[i]; if (phydev) { - printf("%d - %s", i, phydev->drv->name); + printf("%x - %s", i, phydev->drv->name); if (phydev->dev) printf(" <--> %s\n", phydev->dev->name); |