[U-Boot] [PATCH v8 1/8] arm: global_data: prepare for Faraday SoC support

Kuo-Jung Su
2013-12-30T09:23:04Z

Add 'cpu_id' and 'has_mmu' for Faraday SoC platforms

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
---
Changes for v8:
- Initial commit

arch/arm/include/asm/global_data.h | 4 ++++
arch/arm/lib/cache-cp15.c | 5 +++++
2 files changed, 9 insertions(+)

diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index e126436..db24a16 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -26,6 +26,10 @@ struct arch_global_data {
unsigned long pllb_rate_hz;
unsigned long at91_pllb_usb_init;
#endif
+#ifdef CONFIG_SOC_FARADAY
+ unsigned long cpu_id;
+ unsigned long has_mmu;
+#endif
/* "static data" needed by most of timer.c on ARM platforms */
unsigned long timer_rate_hz;
unsigned long tbu;
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index 8642010..550cced 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -90,6 +90,11 @@ static inline void mmu_setup(void)
int i;
u32 reg;

+#ifdef CONFIG_SOC_FARADAY
+ if (!gd->arch.has_mmu)
+ return;
+#endif
+
arm_init_before_mmu();
/* Set up an identity-mapping for all 4GB, rw for everyone */
for (i = 0; i < 4096; i++)
--
1.7.9.5