Merge tag 'u-boot-stm32-20201021' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
[pandora-u-boot.git] / net / mdio-uclass.c
index f75e4df..b5e8e46 100644 (file)
@@ -6,9 +6,13 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
+#include <malloc.h>
 #include <miiphy.h>
 #include <dm/device-internal.h>
+#include <dm/device_compat.h>
 #include <dm/uclass-internal.h>
+#include <linux/compat.h>
 
 /* DT node properties for MAC-PHY interface */
 #define PHY_MODE_STR_CNT       2
@@ -141,7 +145,7 @@ static struct phy_device *dm_eth_connect_phy_handle(struct udevice *ethdev,
                        break;
 
        if (!ofnode_valid(phandle.node)) {
-               dev_dbg(dev, "can't find PHY node\n");
+               dev_dbg(ethdev, "can't find PHY node\n");
                return NULL;
        }
 
@@ -157,7 +161,7 @@ static struct phy_device *dm_eth_connect_phy_handle(struct udevice *ethdev,
        if (uclass_get_device_by_ofnode(UCLASS_MDIO,
                                        ofnode_get_parent(phandle.node),
                                        &mdiodev)) {
-               dev_dbg(dev, "can't find MDIO bus for node %s\n",
+               dev_dbg(ethdev, "can't find MDIO bus for node %s\n",
                        ofnode_get_name(ofnode_get_parent(phandle.node)));
                return NULL;
        }