[PATCH] m68knommu: add 5208 ColdFire cache support
authorGreg Ungerer <gerg@snapgear.com>
Wed, 2 Nov 2005 05:03:09 +0000 (15:03 +1000)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 2 Nov 2005 05:41:20 +0000 (21:41 -0800)
Add support for the cpu cache of the 5208 ColdFire fmaily.
Patch originally from Matt Wadell (from code originally written by
Mike Lavender).

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

index b17cd920977f592c7a05f5fdae337039fb784a66..9cb4014218351515226443804a96e73768ac17a6 100644 (file)
 .endm
 #endif /* CONFIG_M5407 */
 
+#if defined(CONFIG_M520x)
+.macro CACHE_ENABLE
+       move.l  #0x01000000,%d0         /* invalidate whole cache */
+       movec   %d0,%CACR
+       nop
+       move.l  #0x0000c000,%d0         /* set SDRAM cached (write-thru) */
+       movec   %d0,%ACR0
+       move.l  #0x00000000,%d0         /* no other regions cached */
+       movec   %d0,%ACR1
+       move.l  #0x80400000,%d0         /* enable 8K instruction cache */
+       movec   %d0,%CACR
+       nop
+.endm
+#endif /* CONFIG_M520x */
 
 /****************************************************************************/
 #endif /* __M68KNOMMU_MCFCACHE_H */