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

Kuo-Jung Su dantesu at gmail.com
Mon Dec 30 10:23:04 CET 2013


From: Kuo-Jung Su <dantesu at faraday-tech.com>

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

Signed-off-by: Kuo-Jung Su <dantesu at faraday-tech.com>
CC: Albert Aribaud <albert.u.boot at 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



More information about the U-Boot mailing list