aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-feroceon.S
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2008-04-24 01:31:46 -0400
committerNicolas Pitre <nico@cam.org>2008-04-28 15:55:28 -0400
commita7039bd6daa32f5ea1a185b7cb0b3b519e1f5018 (patch)
treeffd25fd9b734d7cec70249a0e3ef8bfe2825ce45 /arch/arm/mm/proc-feroceon.S
parenta3fd133c24e16d430ba21f3d9f5c0b8faeeb37fe (diff)
[ARM] feroceon: remove CONFIG_CPU_DCACHE_WRITETHROUGH check
Since the Feroceon doesn't have a global WT override bit like ARM926 does, remove all code relating to this mode of operation from proc-feroceon.S. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mm/proc-feroceon.S')
-rw-r--r--arch/arm/mm/proc-feroceon.S40
1 files changed, 0 insertions, 40 deletions
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S
index 90e7594e29b1..e9ac984d2897 100644
--- a/arch/arm/mm/proc-feroceon.S
+++ b/arch/arm/mm/proc-feroceon.S
@@ -118,12 +118,8 @@ ENTRY(feroceon_flush_kern_cache_all)
118 mov r2, #VM_EXEC 118 mov r2, #VM_EXEC
119 mov ip, #0 119 mov ip, #0
120__flush_whole_cache: 120__flush_whole_cache:
121#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
122 mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
123#else
1241: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate 1211: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
125 bne 1b 122 bne 1b
126#endif
127 tst r2, #VM_EXEC 123 tst r2, #VM_EXEC
128 mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache 124 mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache
129 mcrne p15, 0, ip, c7, c10, 4 @ drain WB 125 mcrne p15, 0, ip, c7, c10, 4 @ drain WB
@@ -145,21 +141,12 @@ ENTRY(feroceon_flush_user_cache_range)
145 cmp r3, #CACHE_DLIMIT 141 cmp r3, #CACHE_DLIMIT
146 bgt __flush_whole_cache 142 bgt __flush_whole_cache
1471: tst r2, #VM_EXEC 1431: tst r2, #VM_EXEC
148#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
149 mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
150 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
151 add r0, r0, #CACHE_DLINESIZE
152 mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
153 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
154 add r0, r0, #CACHE_DLINESIZE
155#else
156 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry 144 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry
157 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry 145 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
158 add r0, r0, #CACHE_DLINESIZE 146 add r0, r0, #CACHE_DLINESIZE
159 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry 147 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D entry
160 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry 148 mcrne p15, 0, r0, c7, c5, 1 @ invalidate I entry
161 add r0, r0, #CACHE_DLINESIZE 149 add r0, r0, #CACHE_DLINESIZE
162#endif
163 cmp r0, r1 150 cmp r0, r1
164 blo 1b 151 blo 1b
165 tst r2, #VM_EXEC 152 tst r2, #VM_EXEC
@@ -232,12 +219,10 @@ ENTRY(feroceon_flush_kern_dcache_page)
232 * (same as v4wb) 219 * (same as v4wb)
233 */ 220 */
234ENTRY(feroceon_dma_inv_range) 221ENTRY(feroceon_dma_inv_range)
235#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
236 tst r0, #CACHE_DLINESIZE - 1 222 tst r0, #CACHE_DLINESIZE - 1
237 mcrne p15, 0, r0, c7, c10, 1 @ clean D entry 223 mcrne p15, 0, r0, c7, c10, 1 @ clean D entry
238 tst r1, #CACHE_DLINESIZE - 1 224 tst r1, #CACHE_DLINESIZE - 1
239 mcrne p15, 0, r1, c7, c10, 1 @ clean D entry 225 mcrne p15, 0, r1, c7, c10, 1 @ clean D entry
240#endif
241 bic r0, r0, #CACHE_DLINESIZE - 1 226 bic r0, r0, #CACHE_DLINESIZE - 1
2421: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry 2271: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry
243 add r0, r0, #CACHE_DLINESIZE 228 add r0, r0, #CACHE_DLINESIZE
@@ -257,13 +242,11 @@ ENTRY(feroceon_dma_inv_range)
257 * (same as v4wb) 242 * (same as v4wb)
258 */ 243 */
259ENTRY(feroceon_dma_clean_range) 244ENTRY(feroceon_dma_clean_range)
260#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
261 bic r0, r0, #CACHE_DLINESIZE - 1 245 bic r0, r0, #CACHE_DLINESIZE - 1
2621: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 2461: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
263 add r0, r0, #CACHE_DLINESIZE 247 add r0, r0, #CACHE_DLINESIZE
264 cmp r0, r1 248 cmp r0, r1
265 blo 1b 249 blo 1b
266#endif
267 mcr p15, 0, r0, c7, c10, 4 @ drain WB 250 mcr p15, 0, r0, c7, c10, 4 @ drain WB
268 mov pc, lr 251 mov pc, lr
269 252
@@ -278,11 +261,7 @@ ENTRY(feroceon_dma_clean_range)
278ENTRY(feroceon_dma_flush_range) 261ENTRY(feroceon_dma_flush_range)
279 bic r0, r0, #CACHE_DLINESIZE - 1 262 bic r0, r0, #CACHE_DLINESIZE - 1
2801: 2631:
281#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
282 mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry 264 mcr p15, 0, r0, c7, c14, 1 @ clean+invalidate D entry
283#else
284 mcr p15, 0, r0, c7, c10, 1 @ clean D entry
285#endif
286 add r0, r0, #CACHE_DLINESIZE 265 add r0, r0, #CACHE_DLINESIZE
287 cmp r0, r1 266 cmp r0, r1
288 blo 1b 267 blo 1b
@@ -301,12 +280,10 @@ ENTRY(feroceon_cache_fns)
301 .long feroceon_dma_flush_range 280 .long feroceon_dma_flush_range
302 281
303ENTRY(cpu_feroceon_dcache_clean_area) 282ENTRY(cpu_feroceon_dcache_clean_area)
304#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
3051: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 2831: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
306 add r0, r0, #CACHE_DLINESIZE 284 add r0, r0, #CACHE_DLINESIZE
307 subs r1, r1, #CACHE_DLINESIZE 285 subs r1, r1, #CACHE_DLINESIZE
308 bhi 1b 286 bhi 1b
309#endif
310 mcr p15, 0, r0, c7, c10, 4 @ drain WB 287 mcr p15, 0, r0, c7, c10, 4 @ drain WB
311 mov pc, lr 288 mov pc, lr
312 289
@@ -323,13 +300,9 @@ ENTRY(cpu_feroceon_dcache_clean_area)
323ENTRY(cpu_feroceon_switch_mm) 300ENTRY(cpu_feroceon_switch_mm)
324#ifdef CONFIG_MMU 301#ifdef CONFIG_MMU
325 mov ip, #0 302 mov ip, #0
326#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
327 mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache
328#else
329@ && 'Clean & Invalidate whole DCache' 303@ && 'Clean & Invalidate whole DCache'
3301: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate 3041: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate
331 bne 1b 305 bne 1b
332#endif
333 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache 306 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
334 mcr p15, 0, ip, c7, c10, 4 @ drain WB 307 mcr p15, 0, ip, c7, c10, 4 @ drain WB
335 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer 308 mcr p15, 0, r0, c2, c0, 0 @ load page table pointer
@@ -362,16 +335,9 @@ ENTRY(cpu_feroceon_set_pte_ext)
362 tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young? 335 tst r1, #L_PTE_PRESENT | L_PTE_YOUNG @ Present and Young?
363 movne r2, #0 336 movne r2, #0
364 337
365#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
366 eor r3, r2, #0x0a @ C & small page?
367 tst r3, #0x0b
368 biceq r2, r2, #4
369#endif
370 str r2, [r0] @ hardware version 338 str r2, [r0] @ hardware version
371 mov r0, r0 339 mov r0, r0
372#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
373 mcr p15, 0, r0, c7, c10, 1 @ clean D entry 340 mcr p15, 0, r0, c7, c10, 1 @ clean D entry
374#endif
375 mcr p15, 0, r0, c7, c10, 4 @ drain WB 341 mcr p15, 0, r0, c7, c10, 4 @ drain WB
376#endif 342#endif
377 mov pc, lr 343 mov pc, lr
@@ -387,12 +353,6 @@ __feroceon_setup:
387 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 353 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
388#endif 354#endif
389 355
390
391#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
392 mov r0, #4 @ disable write-back on caches explicitly
393 mcr p15, 7, r0, c15, c0, 0
394#endif
395
396 adr r5, feroceon_crval 356 adr r5, feroceon_crval
397 ldmia r5, {r5, r6} 357 ldmia r5, {r5, r6}
398 mrc p15, 0, r0, c1, c0 @ get control register v4 358 mrc p15, 0, r0, c1, c0 @ get control register v4