Skip to contentSkip to conversation

m68knommu: disable cache early in startup for ColdFire

PATCH New [email protected] 1 participant 1 message Nov 18, 2011 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68knommu: disable cache early in startup for ColdFire

From: Greg Ungerer <[email protected]>

Disbale the CPU cache really early in the ColdFire startup code. We set up some variables for RAM sizing and we want to make they stick in RAM.

---
 arch/m68k/platform/coldfire/head.S |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/m68k/platform/coldfire/head.S +3 -3
index c334838..49666b4 100644
@@ -143,6 +143,9 @@ __HEAD
 _start:
 	nop					/* filler */
 	movew	#0x2700, %sr			/* no interrupts */
+	movel	#CACHE_INIT,%d0			/* disable cache */
+	movec	%d0,%CACR
+	nop
 #if defined(CONFIG_UBOOT)
 	movel	%sp,_init_sp			/* save initial stack pointer */
 #endif
@@ -176,9 +179,6 @@ _start:
 	 *	it is very similar. Define the exact settings in the headers
 	 *	then the code here is the same for all.
 	 */
-	movel	#CACHE_INIT,%d0			/* invalidate whole cache */
-	movec	%d0,%CACR
-	nop
 	movel	#ACR0_MODE,%d0			/* set RAM region for caching */
 	movec	%d0,%ACR0
 	movel	#ACR1_MODE,%d0			/* anything else to cache? */
Signature · 1 line
1.7.0.4