aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-11-09 01:00:17 -0500
committerGreg Ungerer <gerg@uclinux.org>2011-01-05 00:19:20 -0500
commit4a5bae416562a8224707a1ff30e83ddab1474fb3 (patch)
treee827800effdcb4d96a5042aa5540fd5553881775 /arch/m68k
parent0ef6c9b8f7bf62ea05be5b26ee14b18a116b0c2a (diff)
m68knommu: support ColdFire caches that do copyback and write-through
The version 3 and version 4 ColdFire cache controllers support both write-through and copy-back modes on the data cache. Allow for Kconfig time configuration of this, and set the cache mode appropriately. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/m53xxacr.h8
-rw-r--r--arch/m68k/include/asm/m54xxacr.h4
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/m53xxacr.h b/arch/m68k/include/asm/m53xxacr.h
index 74c81c9b177e..d8b8dd68368f 100644
--- a/arch/m68k/include/asm/m53xxacr.h
+++ b/arch/m68k/include/asm/m53xxacr.h
@@ -53,6 +53,12 @@
53 * CACR is cache inhibited, we use the ACR register to set cacheing 53 * CACR is cache inhibited, we use the ACR register to set cacheing
54 * enabled on the regions we want (eg RAM). 54 * enabled on the regions we want (eg RAM).
55 */ 55 */
56#if defined(CONFIG_CACHE_COPYBACK)
57#define CACHE_TYPE ACR_CM_CB
58#else
59#define CACHE_TYPE ACR_CM_WT
60#endif
61
56#ifdef CONFIG_COLDFIRE_SW_A7 62#ifdef CONFIG_COLDFIRE_SW_A7
57#define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE) 63#define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE)
58#else 64#else
@@ -63,7 +69,7 @@
63 69
64#define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \ 70#define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \
65 (0x000f0000) + \ 71 (0x000f0000) + \
66 (ACR_ENABLE + ACR_ANY + ACR_CM_CB)) 72 (ACR_ENABLE + ACR_ANY + CACHE_TYPE))
67#define ACR1_MODE 0 73#define ACR1_MODE 0
68 74
69/****************************************************************************/ 75/****************************************************************************/
diff --git a/arch/m68k/include/asm/m54xxacr.h b/arch/m68k/include/asm/m54xxacr.h
index 6bce82fdb9c3..29d4713f796b 100644
--- a/arch/m68k/include/asm/m54xxacr.h
+++ b/arch/m68k/include/asm/m54xxacr.h
@@ -73,7 +73,11 @@
73#else 73#else
74#define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC+CACR_EUSP) 74#define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC+CACR_EUSP)
75#endif 75#endif
76#if defined(CONFIG_CACHE_COPYBACK)
77#define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_CP)
78#else
76#define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_WT) 79#define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_WT)
80#endif
77#define INSN_CACHE_MODE (ACR_ENABLE+ACR_ANY) 81#define INSN_CACHE_MODE (ACR_ENABLE+ACR_ANY)
78 82
79#define CACHE_INIT (CACR_DCINVA+CACR_BCINVA+CACR_ICINVA) 83#define CACHE_INIT (CACR_DCINVA+CACR_BCINVA+CACR_ICINVA)