[U-Boot] [PATCH 36/38] common: arm: davinci: Move header file out of common
Simon Glass
sjg at chromium.org
Wed May 17 14:23:09 UTC 2017
We should not have an arch-specific header file in common.h. Instead, use
the asm/hardware.h header to provide the required declarations, and drop
the common.h changes.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/arm/mach-davinci/include/mach/davinci_misc.h | 2 ++
arch/arm/mach-davinci/include/mach/hardware.h | 5 ++++-
include/common.h | 3 ---
include/configs/calimain.h | 2 ++
include/configs/da850evm.h | 3 +++
include/configs/ea20.h | 2 ++
include/configs/ipam390.h | 2 ++
include/configs/legoev3.h | 2 ++
include/configs/omapl138_lcdk.h | 3 +++
9 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-davinci/include/mach/davinci_misc.h b/arch/arm/mach-davinci/include/mach/davinci_misc.h
index 03be3882f8..79090e0671 100644
--- a/arch/arm/mach-davinci/include/mach/davinci_misc.h
+++ b/arch/arm/mach-davinci/include/mach/davinci_misc.h
@@ -7,6 +7,8 @@
#ifndef __MISC_H
#define __MISC_H
+#include <asm/arch/hardware.h>
+
/* pin muxer definitions */
#define PIN_MUX_NUM_FIELDS 8 /* Per register */
#define PIN_MUX_FIELD_SIZE 4 /* n in bits */
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h
index c31f38c8a2..e11099cb93 100644
--- a/arch/arm/mach-davinci/include/mach/hardware.h
+++ b/arch/arm/mach-davinci/include/mach/hardware.h
@@ -14,14 +14,15 @@
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
-#include <config.h>
#include <linux/sizes.h>
#define REG(addr) (*(volatile unsigned int *)(addr))
#define REG_P(addr) ((volatile unsigned int *)(addr))
+#ifndef __ASSEMBLY__
typedef volatile unsigned int dv_reg;
typedef volatile unsigned int * dv_reg_p;
+#endif
/*
* Base register addresses
@@ -285,6 +286,7 @@ typedef volatile unsigned int * dv_reg_p;
#endif /* CONFIG_SOC_DA8XX */
+#ifndef __ASSEMBLY__
void lpsc_on(unsigned int id);
void lpsc_syncreset(unsigned int id);
void lpsc_disable(unsigned int id);
@@ -625,5 +627,6 @@ static inline enum davinci_clk_ids get_async3_src(void)
#define FLAG_FLGOFF 0x00000010
#endif
+#endif /* !__ASSEMBLY__ */
#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/include/common.h b/include/common.h
index 19839b67f1..b97b61d65d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -31,9 +31,6 @@ typedef volatile unsigned char vu_char;
#include <stdarg.h>
#include <linux/kernel.h>
-#ifdef CONFIG_SOC_DA8XX
-#include <asm/arch/hardware.h>
-#endif
#ifdef CONFIG_FSL_LSCH3
#include <asm/arch/immap_lsch3.h>
#endif
diff --git a/include/configs/calimain.h b/include/configs/calimain.h
index 6e2fd33563..61bae7728e 100644
--- a/include/configs/calimain.h
+++ b/include/configs/calimain.h
@@ -318,4 +318,6 @@
int calimain_get_osc_freq(void);
#endif
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 9442c05943..139d74882e 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -334,4 +334,7 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
GENERATED_GBL_DATA_SIZE)
#endif /* CONFIG_DIRECT_NOR_BOOT */
+
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index 3a5b5c7285..f4b3a60dd3 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -273,4 +273,6 @@
"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \
"bootcmd=run net_testrfs\0"
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
diff --git a/include/configs/ipam390.h b/include/configs/ipam390.h
index 5caf02e8d9..a83b5da599 100644
--- a/include/configs/ipam390.h
+++ b/include/configs/ipam390.h
@@ -304,4 +304,6 @@
#define CONFIG_IPAM390_GPIO_LED_RED ((16 * 7) + 11)
#define CONFIG_IPAM390_GPIO_LED_GREEN ((16 * 7) + 12)
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
index c5e7d629ab..e62af3ff42 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -215,4 +215,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x80010000
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 0cc0042bca..2de7cd5004 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -345,4 +345,7 @@
#define CONFIG_SYS_SDRAM_BASE 0xc0000000
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
GENERATED_GBL_DATA_SIZE)
+
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
--
2.13.0.303.g4ebf302169-goog
More information about the U-Boot
mailing list