aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/m53xxacr.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/include/asm/m53xxacr.h')
-rw-r--r--arch/m68k/include/asm/m53xxacr.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/m68k/include/asm/m53xxacr.h b/arch/m68k/include/asm/m53xxacr.h
index d8b8dd68368f..cd952b0a8bd3 100644
--- a/arch/m68k/include/asm/m53xxacr.h
+++ b/arch/m68k/include/asm/m53xxacr.h
@@ -49,12 +49,29 @@
49#define ACR_WPROTECT 0x00000004 /* Write protect region */ 49#define ACR_WPROTECT 0x00000004 /* Write protect region */
50 50
51/* 51/*
52 * Define the cache type and arrangement (needed for pushes).
53 */
54#if defined(CONFIG_M5307)
55#define CACHE_SIZE 0x2000 /* 8k of unified cache */
56#define ICACHE_SIZE CACHE_SIZE
57#define DCACHE_SIZE CACHE_SIZE
58#elif defined(CONFIG_M532x)
59#define CACHE_SIZE 0x4000 /* 32k of unified cache */
60#define ICACHE_SIZE CACHE_SIZE
61#define DCACHE_SIZE CACHE_SIZE
62#endif
63
64#define CACHE_LINE_SIZE 16 /* 16 byte line size */
65#define CACHE_WAYS 4 /* 4 ways - set associative */
66
67/*
52 * Set the cache controller settings we will use. This default in the 68 * Set the cache controller settings we will use. This default in the
53 * CACR is cache inhibited, we use the ACR register to set cacheing 69 * CACR is cache inhibited, we use the ACR register to set cacheing
54 * enabled on the regions we want (eg RAM). 70 * enabled on the regions we want (eg RAM).
55 */ 71 */
56#if defined(CONFIG_CACHE_COPYBACK) 72#if defined(CONFIG_CACHE_COPYBACK)
57#define CACHE_TYPE ACR_CM_CB 73#define CACHE_TYPE ACR_CM_CB
74#define CACHE_PUSH
58#else 75#else
59#define CACHE_TYPE ACR_CM_WT 76#define CACHE_TYPE ACR_CM_WT
60#endif 77#endif
@@ -65,7 +82,15 @@
65#define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE + CACR_EUSP) 82#define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE + CACR_EUSP)
66#endif 83#endif
67 84
68#define CACHE_INIT CACR_CINVA 85/*
86 * Unified cache means we will never need to flush for coherency of
87 * instruction fetch. We will need to flush to maintain memory/DMA
88 * coherency though in all cases. And for copyback caches we will need
89 * to push cached data as well.
90 */
91#define CACHE_INIT CACR_CINVA
92#define CACHE_INVALIDATE CACR_CINVA
93#define CACHE_INVALIDATED CACR_CINVA
69 94
70#define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \ 95#define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \
71 (0x000f0000) + \ 96 (0x000f0000) + \