]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/miiphyutil.c
Merge git://git.denx.de/u-boot-i2c
[people/ms/u-boot.git] / common / miiphyutil.c
index d8ebb384dbfa82012284edea1999fd6ddc0c325f..8eb0f761bb0164de32d4a47f69a8b19dd9f98756 100644 (file)
@@ -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);