Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] m68knommu: cache support for 523x/528x processors

Add support for the cache of the ColdFIre 523x family of processors.
Enable the 528x cache by default now, all final shipping silicon
has the cache bug fixed.

Signed-off-by: Greg Ungerer <gerg@uclinux.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Greg Ungerer and committed by
Linus Torvalds
8a6e43e9 7dd6a2aa

+11 -14
+11 -14
include/asm-m68knommu/mcfcache.h
··· 33 33 .endm 34 34 #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ 35 35 36 - #if defined(CONFIG_M527x) 36 + #if defined(CONFIG_M523x) || defined(CONFIG_M527x) 37 37 /* 38 38 * New version 2 cores have a configurable split cache arrangement. 39 39 * For now I am just enabling instruction cache - but ultimately I ··· 51 51 movec %d0,%CACR /* enable cache */ 52 52 nop 53 53 .endm 54 - #endif /* CONFIG_M527x */ 54 + #endif /* CONFIG_M523x || CONFIG_M527x */ 55 55 56 56 #if defined(CONFIG_M528x) 57 - /* 58 - * Cache is totally broken on early 5282 silicon. So far now we 59 - * disable its cache all together. 60 - */ 61 57 .macro CACHE_ENABLE 62 - movel #0x01000000,%d0 63 - movec %d0,%CACR /* invalidate cache */ 64 58 nop 65 - movel #0x0000c000,%d0 /* set SDRAM cached only */ 66 - movec %d0,%ACR0 67 - movel #0x00000000,%d0 /* no other regions cached */ 68 - movec %d0,%ACR1 69 - movel #0x00000000,%d0 /* configure cache */ 70 - movec %d0,%CACR /* enable cache */ 59 + movel #0x01000000, %d0 60 + movec %d0, %CACR /* Invalidate cache */ 61 + nop 62 + movel #0x0000c020, %d0 /* Set SDRAM cached only */ 63 + movec %d0, %ACR0 64 + movel #0xff00c000, %d0 /* Cache Flash also */ 65 + movec %d0, %ACR1 66 + movel #0x80000200, %d0 /* Setup cache mask */ 67 + movec %d0, %CACR /* Enable cache */ 71 68 nop 72 69 .endm 73 70 #endif /* CONFIG_M528x */