[U-Boot] [PATCH 24/38] nds32: Remove include files from common.h

Simon Glass sjg at chromium.org
Wed May 17 14:22:57 UTC 2017


With a few tweaks we can avoid including these files, which are only
needed by two C files.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/nds32/lib/bootm.c                  | 1 +
 board/AndesTech/adp-ag101p/adp-ag101p.c | 1 +
 include/common.h                        | 5 -----
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 8b0b28fd99..c79b6d4044 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
+#include <asm/setup.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index 805a266f63..e9d7def21c 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 
 #include <faraday/ftsdc010.h>
 #include <faraday/ftsmc020.h>
diff --git a/include/common.h b/include/common.h
index 02fda57f85..c5cb65beda 100644
--- a/include/common.h
+++ b/include/common.h
@@ -430,11 +430,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/setup.h>
 # include <asm/u-boot.h>
 #endif /* CONFIG_ARM */
-#ifdef CONFIG_NDS32
-# include <asm/mach-types.h>
-# include <asm/setup.h>
-# include <asm/u-boot.h>
-#endif /* CONFIG_NDS32 */
 
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
-- 
2.13.0.303.g4ebf302169-goog



More information about the U-Boot mailing list