Merge tag 'u-boot-nand-20230417' of https://source.denx.de/u-boot/custodians/u-boot...
[platform/kernel/u-boot.git] / common / miiphyutil.c
index 8d89751..194c84e 100644 (file)
 
 #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>
@@ -177,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;
@@ -359,7 +366,7 @@ int miiphy_reset(const char *devname, unsigned char addr)
                debug("PHY reset failed\n");
                return -1;
        }
-#ifdef CONFIG_PHY_RESET_DELAY
+#if CONFIG_PHY_RESET_DELAY > 0
        udelay(CONFIG_PHY_RESET_DELAY); /* Intel LXT971A needs this */
 #endif
        /*