Browse Source

MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE

in cpu/mcf532x/start.S, the function icache_enable enables the cache for
a fixed 32MB region starting at the SDRAM start address; this patch
changes the function to cover the region defined by CONFIG_SYS_SDRAM_SIZE

Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
Wolfgang Wegner 15 years ago
parent
commit
992d712950
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cpu/mcf532x/start.S

+ 1 - 1
cpu/mcf532x/start.S

@@ -280,7 +280,7 @@ _int_handler:
 icache_enable:
 icache_enable:
 	move.l	#0x01000000, %d0		/* Invalidate cache cmd */
 	move.l	#0x01000000, %d0		/* Invalidate cache cmd */
 	movec	%d0, %CACR			/* Invalidate cache */
 	movec	%d0, %CACR			/* Invalidate cache */
-	move.l	#(CONFIG_SYS_SDRAM_BASE + 0x1c000), %d0
+	move.l  #(CONFIG_SYS_SDRAM_BASE + 0xc000 + ((CONFIG_SYS_SDRAM_SIZE & 0x1fe0) << 11)), %d0
 	movec	%d0, %ACR0			/* Enable cache */
 	movec	%d0, %ACR0			/* Enable cache */
 
 
 	move.l	#0x80000200, %d0		/* Setup cache mask */
 	move.l	#0x80000200, %d0		/* Setup cache mask */