[U-Boot] [PATCH 37/38] common: arm: freescale: layerscape: Move header files out of common.h
Simon Glass
sjg at chromium.org
Wed May 17 14:23:10 UTC 2017
We should not have an arch-specific header file in common.h. Adjust the
board files a little so it is not needed, and drop it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/arm/include/asm/arch-fsl-layerscape/soc.h | 11 +++++++++++
arch/arm/include/asm/arch-ls102xa/clock.h | 1 +
arch/arm/include/asm/arch-ls102xa/soc.h | 0
drivers/ddr/fsl/ctrl_regs.c | 3 ++-
drivers/ddr/fsl/fsl_ddr_gen4.c | 3 ++-
drivers/ddr/fsl/options.c | 3 ++-
drivers/ddr/fsl/util.c | 3 ++-
drivers/usb/common/fsl-errata.c | 3 ++-
include/common.h | 7 -------
include/configs/ls1012a_common.h | 2 ++
include/configs/ls1043a_common.h | 2 ++
include/configs/ls1046a_common.h | 2 ++
include/configs/ls2080a_common.h | 2 ++
include/fsl_ifc.h | 3 +++
14 files changed, 33 insertions(+), 12 deletions(-)
create mode 100644 arch/arm/include/asm/arch-ls102xa/soc.h
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/soc.h b/arch/arm/include/asm/arch-fsl-layerscape/soc.h
index 426fe8ef86..a35cb9eaea 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/soc.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/soc.h
@@ -7,6 +7,16 @@
#ifndef _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_
#define _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+#ifdef CONFIG_FSL_LSCH2
+#include <asm/arch/immap_lsch2.h>
+#endif
+#ifdef CONFIG_FSL_LSCH3
+#include <asm/arch/immap_lsch3.h>
+#endif
+#endif
+
#ifdef CONFIG_SYS_FSL_CCSR_GUR_LE
#define gur_in32(a) in_le32(a)
#define gur_out32(a, v) out_le32(a, v)
@@ -117,4 +127,5 @@ void erratum_a010315(void);
bool soc_has_dp_ddr(void);
bool soc_has_aiop(void);
#endif
+
#endif /* _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_ */
diff --git a/arch/arm/include/asm/arch-ls102xa/clock.h b/arch/arm/include/asm/arch-ls102xa/clock.h
index c1efb9919e..a1d6afec93 100644
--- a/arch/arm/include/asm/arch-ls102xa/clock.h
+++ b/arch/arm/include/asm/arch-ls102xa/clock.h
@@ -19,6 +19,7 @@ enum mxc_clock {
};
unsigned int mxc_get_clock(enum mxc_clock clk);
+ulong get_ddr_freq(ulong);
uint get_svr(void);
#endif /* __ASM_ARCH_LS102XA_CLOCK_H_ */
diff --git a/arch/arm/include/asm/arch-ls102xa/soc.h b/arch/arm/include/asm/arch-ls102xa/soc.h
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index e2d66c33ec..c0ee858a02 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -16,7 +16,8 @@
#include <fsl_ddr.h>
#include <fsl_immap.h>
#include <asm/io.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+ defined(CONFIG_ARM)
#include <asm/arch/clock.h>
#endif
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index e612e7e749..3349fc5c3b 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -11,7 +11,8 @@
#include <fsl_immap.h>
#include <fsl_ddr.h>
#include <fsl_errata.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+ defined(CONFIG_ARM)
#include <asm/arch/clock.h>
#endif
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index 8897c17e99..20edd2dc28 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -9,7 +9,8 @@
#include <fsl_ddr_sdram.h>
#include <fsl_ddr.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+ defined(CONFIG_ARM)
#include <asm/arch/clock.h>
#endif
diff --git a/drivers/ddr/fsl/util.c b/drivers/ddr/fsl/util.c
index e59f29215a..0a305b36b8 100644
--- a/drivers/ddr/fsl/util.c
+++ b/drivers/ddr/fsl/util.c
@@ -13,7 +13,8 @@
#include <fsl_ddr.h>
#include <fsl_immap.h>
#include <asm/io.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+ defined(CONFIG_ARM)
#include <asm/arch/clock.h>
#endif
diff --git a/drivers/usb/common/fsl-errata.c b/drivers/usb/common/fsl-errata.c
index 1dfa73d68e..4e642ae435 100644
--- a/drivers/usb/common/fsl-errata.c
+++ b/drivers/usb/common/fsl-errata.c
@@ -9,7 +9,8 @@
#include <common.h>
#include <fsl_errata.h>
#include<fsl_usb.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+ defined(CONFIG_ARM)
#include <asm/arch/clock.h>
#endif
diff --git a/include/common.h b/include/common.h
index b97b61d65d..a413f1ae9b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -31,13 +31,6 @@ typedef volatile unsigned char vu_char;
#include <stdarg.h>
#include <linux/kernel.h>
-#ifdef CONFIG_FSL_LSCH3
-#include <asm/arch/immap_lsch3.h>
-#endif
-#ifdef CONFIG_FSL_LSCH2
-#include <asm/arch/immap_lsch2.h>
-#endif
-
#include <part.h>
#include <flash.h>
#include <image.h>
diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
index 09f890d55c..1d01cd9906 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -123,4 +123,6 @@
#define CONFIG_PANIC_HANG
#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
+#include <asm/arch/soc.h>
+
#endif /* __LS1012A_COMMON_H */
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index e26924877d..b5f36c3e57 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -307,4 +307,6 @@
#define CONFIG_SHA_HW_ACCEL
#endif
+#include <asm/arch/soc.h>
+
#endif /* __LS1043A_COMMON_H */
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index 957ffd3634..d1dc823d6a 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -236,4 +236,6 @@
#define CONFIG_SHA_HW_ACCEL
#endif
+#include <asm/arch/soc.h>
+
#endif /* __LS1046A_COMMON_H */
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 427f623e8c..baadc12e36 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -236,4 +236,6 @@ unsigned long long get_qixis_addr(void);
#define CONFIG_SHA_HW_ACCEL
#endif
+#include <asm/arch/soc.h>
+
#endif /* __LS2_COMMON_H */
diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h
index a86f2162aa..29aa687507 100644
--- a/include/fsl_ifc.h
+++ b/include/fsl_ifc.h
@@ -11,6 +11,9 @@
#ifdef CONFIG_FSL_IFC
#include <config.h>
#include <common.h>
+#ifdef CONFIG_ARM
+#include <asm/arch/soc.h>
+#endif
#define FSL_IFC_V1_1_0 0x01010000
#define FSL_IFC_V2_0_0 0x02000000
--
2.13.0.303.g4ebf302169-goog
More information about the U-Boot
mailing list