X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cmd%2Fmdio.c;h=21dc103736e7f8bbc67b6dfea2a240ecd34662a3;hb=b504ff9f6bbdd4d3700595f64f3c30c5c9f70d35;hp=fb13d050752a7f2abeb615101e76046257477fe5;hpb=d82477748d641e60ba3e1a0b55d98362aed70f80;p=u-boot diff --git a/cmd/mdio.c b/cmd/mdio.c index fb13d05075..21dc103736 100644 --- a/cmd/mdio.c +++ b/cmd/mdio.c @@ -27,12 +27,12 @@ static uint last_reg_hi; static int extract_range(char *input, int *plo, int *phi) { char *end; - *plo = simple_strtol(input, &end, 0); + *plo = simple_strtol(input, &end, 16); if (end == input) return -1; if ((*end == '-') && *(++end)) - *phi = simple_strtol(end, NULL, 0); + *phi = simple_strtol(end, NULL, 16); else if (*end == '\0') *phi = *plo; else @@ -79,7 +79,7 @@ static int mdio_read_ranges(struct phy_device *phydev, struct mii_dev *bus, printf("Reading from bus %s\n", bus->name); for (addr = addrlo; addr <= addrhi; addr++) { - printf("PHY at address %d:\n", addr); + printf("PHY at address %x:\n", addr); for (devad = devadlo; devad <= devadhi; devad++) { for (reg = reglo; reg <= reghi; reg++) {