[U-Boot] [RFC PATCH] common: miiphyutil: Work and report phy address in hex in mdio cmd

Simon Glass sjg at chromium.org
Fri Nov 18 02:14:56 CET 2016


On 16 November 2016 at 01:24, Michal Simek <michal.simek at xilinx.com> wrote:
> 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 at ff0e0000
> ZynqMP> mdio read ethernet at 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 at xilinx.com>
> ---
>
>  cmd/mdio.c             | 6 +++---
>  common/miiphyutil.c    | 2 +-
>  drivers/net/zynq_gem.c | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list