[U-Boot-Users] Coldfire 532x PATCH: set up cache for different SDRAM size

w.wegner at astro-kom.de w.wegner at astro-kom.de
Fri Aug 10 11:28:57 CEST 2007


set up cache correctly for SDRAM size other than 16 MB

Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>

(Is this format correct? Which command should be used to get proper patches?
This patch is for u-boot-5329-early, I can not see a reference in the patch itself?)

--
diff --git a/cpu/mcf532x/start.S b/cpu/mcf532x/start.S
index ac44aaa..1010475 100644
--- a/cpu/mcf532x/start.S
+++ b/cpu/mcf532x/start.S
@@ -268,7 +268,7 @@ _int_handler:
 icache_enable:
 	move.l	#0x01000000, %d0		/* Invalidate cache cmd */
 	movec	%d0, %CACR			/* Invalidate cache */
-	move.l	#(CFG_SDRAM_BASE + 0xc000), %d0	/* Setup cache mask */
+	move.l  #(CFG_SDRAM_BASE + 0xc000 + ((CFG_SDRAM_SIZE & 0x1fe0) << 11)), %d0
 	movec	%d0, %ACR0			/* Enable cache */
 
 	move.l	#0x80000200, %d0		/* Setup cache mask */






More information about the U-Boot mailing list