[PATCH] m68knommu: add ColdFire 532x cache init
authorGreg Ungerer <gerg@snapgear.com>
Mon, 26 Jun 2006 00:33:10 +0000 (10:33 +1000)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 00:43:33 +0000 (17:43 -0700)
Add cache init support for the new ColdFire 532x CPU family.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-m68knommu/mcfcache.h

index 45d1ac57ea829f7ec4cc66d28cfcc755c0616462..7b61a8a529f52063fa01b760a78ca125b4e3235a 100644 (file)
 .endm
 #endif /* CONFIG_M5249 || CONFIG_M5307 */
 
+#if defined(CONFIG_M532x)
+.macro CACHE_ENABLE
+       movel   #0x01000000,%d0         /* invalidate cache cmd */
+       movec   %d0,%CACR               /* do invalidate cache */
+       nop
+       movel   #0x4001C000,%d0         /* set SDRAM cached (write-thru) */
+       movec   %d0,%ACR0
+       movel   #0x00000000,%d0         /* no other regions cached */
+       movec   %d0,%ACR1
+       movel   #0x80000200,%d0         /* setup cache mask */
+       movec   %d0,%CACR               /* enable cache */
+       nop
+.endm
+#endif /* CONFIG_M532x */
+
 #if defined(CONFIG_M5407)
 /*
  *     Version 4 cores have a true harvard style separate instruction