summaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/m53xxacr.h
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-11-09 16:00:17 +1000
committerGreg Ungerer <gerg@uclinux.org>2011-01-05 15:19:20 +1000
commit4a5bae416562a8224707a1ff30e83ddab1474fb3 (patch)
treee827800effdcb4d96a5042aa5540fd5553881775 /arch/m68k/include/asm/m53xxacr.h
parent0ef6c9b8f7bf62ea05be5b26ee14b18a116b0c2a (diff)
downloadop-kernel-dev-4a5bae416562a8224707a1ff30e83ddab1474fb3.zip
op-kernel-dev-4a5bae416562a8224707a1ff30e83ddab1474fb3.tar.gz
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/include/asm/m53xxacr.h')
-rw-r--r--arch/m68k/include/asm/m53xxacr.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/m53xxacr.h b/arch/m68k/include/asm/m53xxacr.h
index 74c81c9..d8b8dd6 100644
--- a/arch/m68k/include/asm/m53xxacr.h
+++ b/arch/m68k/include/asm/m53xxacr.h
@@ -53,6 +53,12 @@
* CACR is cache inhibited, we use the ACR register to set cacheing
* enabled on the regions we want (eg RAM).
*/
+#if defined(CONFIG_CACHE_COPYBACK)
+#define CACHE_TYPE ACR_CM_CB
+#else
+#define CACHE_TYPE ACR_CM_WT
+#endif
+
#ifdef CONFIG_COLDFIRE_SW_A7
#define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE)
#else
@@ -63,7 +69,7 @@
#define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \
(0x000f0000) + \
- (ACR_ENABLE + ACR_ANY + ACR_CM_CB))
+ (ACR_ENABLE + ACR_ANY + CACHE_TYPE))
#define ACR1_MODE 0
/****************************************************************************/
OpenPOWER on IntegriCloud