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++) { 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); diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 3319e10467..526eac658a 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -706,7 +706,7 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev) priv->emio = fdtdec_get_bool(gd->fdt_blob, dev->of_offset, "xlnx,emio"); - printf("ZYNQ GEM: %lx, phyaddr %d, interface %s\n", (ulong)priv->iobase, + printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n", (ulong)priv->iobase, priv->phyaddr, phy_string_for_interface(priv->interface)); return 0;