diff options
-rw-r--r-- | arch/m68k/include/asm/m53xxacr.h | 8 | ||||
-rw-r--r-- | arch/m68k/include/asm/m54xxacr.h | 4 | ||||
-rw-r--r-- | arch/m68knommu/Kconfig | 24 |
3 files changed, 35 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) |
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index 61c29081b998..89b12237e1ed 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -82,6 +82,9 @@ config COLDFIRE_SW_A7 | |||
82 | config HAVE_CACHE_SPLIT | 82 | config HAVE_CACHE_SPLIT |
83 | bool | 83 | bool |
84 | 84 | ||
85 | config HAVE_CACHE_CB | ||
86 | bool | ||
87 | |||
85 | source "init/Kconfig" | 88 | source "init/Kconfig" |
86 | 89 | ||
87 | source "kernel/Kconfig.freezer" | 90 | source "kernel/Kconfig.freezer" |
@@ -172,27 +175,32 @@ config M528x | |||
172 | config M5307 | 175 | config M5307 |
173 | bool "MCF5307" | 176 | bool "MCF5307" |
174 | select COLDFIRE_SW_A7 | 177 | select COLDFIRE_SW_A7 |
178 | select HAVE_CACHE_CB | ||
175 | help | 179 | help |
176 | Motorola ColdFire 5307 processor support. | 180 | Motorola ColdFire 5307 processor support. |
177 | 181 | ||
178 | config M532x | 182 | config M532x |
179 | bool "MCF532x" | 183 | bool "MCF532x" |
184 | select HAVE_CACHE_CB | ||
180 | help | 185 | help |
181 | Freescale (Motorola) ColdFire 532x processor support. | 186 | Freescale (Motorola) ColdFire 532x processor support. |
182 | 187 | ||
183 | config M5407 | 188 | config M5407 |
184 | bool "MCF5407" | 189 | bool "MCF5407" |
185 | select COLDFIRE_SW_A7 | 190 | select COLDFIRE_SW_A7 |
191 | select HAVE_CACHE_CB | ||
186 | help | 192 | help |
187 | Motorola ColdFire 5407 processor support. | 193 | Motorola ColdFire 5407 processor support. |
188 | 194 | ||
189 | config M547x | 195 | config M547x |
190 | bool "MCF547x" | 196 | bool "MCF547x" |
197 | select HAVE_CACHE_CB | ||
191 | help | 198 | help |
192 | Freescale ColdFire 5470/5471/5472/5473/5474/5475 processor support. | 199 | Freescale ColdFire 5470/5471/5472/5473/5474/5475 processor support. |
193 | 200 | ||
194 | config M548x | 201 | config M548x |
195 | bool "MCF548x" | 202 | bool "MCF548x" |
203 | select HAVE_CACHE_CB | ||
196 | help | 204 | help |
197 | Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. | 205 | Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. |
198 | 206 | ||
@@ -279,7 +287,23 @@ config CACHE_BOTH | |||
279 | Split the ColdFire CPU cache, and use half as an instruction cache | 287 | Split the ColdFire CPU cache, and use half as an instruction cache |
280 | and half as a data cache. | 288 | and half as a data cache. |
281 | endchoice | 289 | endchoice |
290 | endif | ||
291 | |||
292 | if HAVE_CACHE_CB | ||
293 | choice | ||
294 | prompt "Data cache mode" | ||
295 | default CACHE_WRITETHRU | ||
282 | 296 | ||
297 | config CACHE_WRITETHRU | ||
298 | bool "Write-through" | ||
299 | help | ||
300 | The ColdFire CPU cache is set into Write-through mode. | ||
301 | |||
302 | config CACHE_COPYBACK | ||
303 | bool "Copy-back" | ||
304 | help | ||
305 | The ColdFire CPU cache is set into Copy-back mode. | ||
306 | endchoice | ||
283 | endif | 307 | endif |
284 | 308 | ||
285 | comment "Platform" | 309 | comment "Platform" |