net: Drop dm.h header file from phy.h
authorSimon Glass <sjg@chromium.org>
Sun, 19 Jul 2020 16:15:39 +0000 (10:15 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 4 Aug 2020 02:19:54 +0000 (22:19 -0400)
This header file should not be included in other header files. Remove it
and use other headers and C inclusions instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/mdio.c
cmd/mii.c
include/dm/read.h
include/phy.h
include/phy_interface.h
net/eth_legacy.c

index c48bb51..cfa45ad 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <dm.h>
 #include <miiphy.h>
 #include <phy.h>
 
index b52a55d..fe8602e 100644 (file)
--- a/cmd/mii.c
+++ b/cmd/mii.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <dm.h>
 #include <miiphy.h>
 
 typedef struct _MII_field_desc_t {
index b1a6108..487ec9e 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/errno.h>
 
+#include <dm/device.h>
 #include <dm/fdtaddr.h>
 #include <dm/ofnode.h>
 #include <dm/uclass.h>
index fedd146..1dbbf65 100644 (file)
@@ -9,14 +9,17 @@
 #ifndef _PHY_H
 #define _PHY_H
 
-#include <dm.h>
+#include <log.h>
+#include <phy_interface.h>
+#include <dm/ofnode.h>
+#include <dm/read.h>
 #include <linux/errno.h>
 #include <linux/list.h>
 #include <linux/mii.h>
 #include <linux/ethtool.h>
 #include <linux/mdio.h>
-#include <log.h>
-#include <phy_interface.h>
+
+struct udevice;
 
 #define PHY_FIXED_ID           0xa5a55a5a
 #define PHY_NCSI_ID            0xbeefcafe
index 882e4af..841ade3 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _PHY_INTERFACE_H
 #define _PHY_INTERFACE_H
 
+#include <string.h>
+
 typedef enum {
        PHY_INTERFACE_MODE_MII,
        PHY_INTERFACE_MODE_GMII,
index 340469b..992d188 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <bootstage.h>
 #include <command.h>
+#include <dm.h>
 #include <env.h>
 #include <log.h>
 #include <net.h>