doc: rockchip: Remove list of supported boards
[oweals/u-boot.git] / common / miiphyutil.c
index aca18db52a008baaf9b393625f7bfebe1e2abf9a..7d4d15ed9189019631578ac9b88ee1f7ac82ce3d 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2001
  * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <miiphy.h>
 #include <phy.h>
+#include <linux/delay.h>
 
 #include <asm/types.h>
 #include <linux/list.h>
@@ -107,6 +108,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)
@@ -166,6 +179,11 @@ struct mii_dev *mdio_get_current_dev(void)
        return current_mii;
 }
 
+struct list_head *mdio_get_list_head(void)
+{
+       return &mii_devs;
+}
+
 struct phy_device *mdio_phydev_for_ethname(const char *ethname)
 {
        struct list_head *entry;