X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fmiiphyutil.c;h=8eb0f761bb0164de32d4a47f69a8b19dd9f98756;hb=d8acc9deeca10992caedb66e0d507bd07b86ee2b;hp=d8ebb384dbfa82012284edea1999fd6ddc0c325f;hpb=46fe9eb08812cc27a0d5cd97d97373c14d578fe9;p=u-boot diff --git a/common/miiphyutil.c b/common/miiphyutil.c index d8ebb384db..8eb0f761bb 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -107,6 +107,18 @@ int mdio_register(struct mii_dev *bus) return 0; } +int mdio_register_seq(struct mii_dev *bus, int seq) +{ + int ret; + + /* Setup a unique name for each mdio bus */ + ret = snprintf(bus->name, MDIO_NAME_LEN, "eth%d", seq); + if (ret < 0) + return ret; + + return mdio_register(bus); +} + int mdio_unregister(struct mii_dev *bus) { if (!bus) @@ -135,7 +147,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);