]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE
authorWolfgang Wegner <w.wegner@astro-kom.de>
Wed, 28 Oct 2009 20:11:00 +0000 (15:11 -0500)
committerTsiChung Liew <tsicliew@gmail.com>
Thu, 4 Mar 2010 07:46:21 +0000 (01:46 -0600)
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>
cpu/mcf532x/start.S

index a46c47adcaa3ff0ba3ac43defa1df981623d7abb..ff13a9f2dde835c2992aed361e2a1fa88c6714a9 100644 (file)
@@ -280,7 +280,7 @@ _int_handler:
 icache_enable:
        move.l  #0x01000000, %d0                /* Invalidate cache cmd */
        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 */
 
        move.l  #0x80000200, %d0                /* Setup cache mask */