[U-Boot] [PATCH 12/30] net: Drop dm.h header file from phy.h

Simon Glass sjg at chromium.org
Sun Oct 27 15:53:52 UTC 2019


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 at chromium.org>
---

 cmd/mdio.c        | 1 +
 cmd/mii.c         | 1 +
 include/dm/read.h | 1 +
 include/phy.h     | 5 ++++-
 net/eth_legacy.c  | 1 +
 5 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/cmd/mdio.c b/cmd/mdio.c
index 22c8fbe856..4e985302a4 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <dm.h>
 #include <miiphy.h>
 #include <phy.h>
 
diff --git a/cmd/mii.c b/cmd/mii.c
index 23ee1e6cfa..fb2769c138 100644
--- 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 {
diff --git a/include/dm/read.h b/include/dm/read.h
index d37fcb504d..75970619f1 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -9,6 +9,7 @@
 #ifndef _DM_READ_H
 #define _DM_READ_H
 
+#include <dm/device.h>
 #include <dm/fdtaddr.h>
 #include <dm/ofnode.h>
 #include <dm/uclass.h>
diff --git a/include/phy.h b/include/phy.h
index e50f56b6eb..4518ddad50 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -9,13 +9,16 @@
 #ifndef _PHY_H
 #define _PHY_H
 
-#include <dm.h>
+#include <dm/ofnode.h>
+#include <dm/read.h>
 #include <linux/list.h>
 #include <linux/mii.h>
 #include <linux/ethtool.h>
 #include <linux/mdio.h>
 #include <phy_interface.h>
 
+struct udevice;
+
 #define PHY_FIXED_ID		0xa5a55a5a
 /*
  * There is no actual id for this.
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 41f5263526..8cdef5b827 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <dm.h>
 #include <env.h>
 #include <net.h>
 #include <phy.h>
-- 
2.24.0.rc0.303.g954a862665-goog



More information about the U-Boot mailing list