diff options
author | Mark A. Greer <mgreer@mvista.com> | 2011-04-01 10:41:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-12 05:07:00 -0400 |
commit | af3e4fd37a18f2e5a00175bc96061541d1364a3b (patch) | |
tree | 2e68bb99fc917dcf4a4611bf661f018fbbc23851 /arch/arm/boot/compressed/head.S | |
parent | 111e9a5ce66e64cbf9cf33a60982f29fd7e224da (diff) |
ARM: 6859/1: Add writethrough dcache support for ARM926EJS processor
The ARM kernel supports writethrough data cache via the
CONFIG_CPU_DCACHE_WRITETHROUGH option. However, that
functionality wasn't implemented in the arch/arm/boot/compressed
code. It is now necessary due to a new ARM926EJS processor
that has an issue with writeback data cache.
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/boot/compressed/head.S')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index adf583cd0c3..ae7ecc286e7 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -447,7 +447,11 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
447 | orr r1, r1, #3 << 10 | 447 | orr r1, r1, #3 << 10 |
448 | add r2, r3, #16384 | 448 | add r2, r3, #16384 |
449 | 1: cmp r1, r9 @ if virt > start of RAM | 449 | 1: cmp r1, r9 @ if virt > start of RAM |
450 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
451 | orrhs r1, r1, #0x08 @ set cacheable | ||
452 | #else | ||
450 | orrhs r1, r1, #0x0c @ set cacheable, bufferable | 453 | orrhs r1, r1, #0x0c @ set cacheable, bufferable |
454 | #endif | ||
451 | cmp r1, r10 @ if virt > end of RAM | 455 | cmp r1, r10 @ if virt > end of RAM |
452 | bichs r1, r1, #0x0c @ clear cacheable, bufferable | 456 | bichs r1, r1, #0x0c @ clear cacheable, bufferable |
453 | str r1, [r0], #4 @ 1:1 mapping | 457 | str r1, [r0], #4 @ 1:1 mapping |
@@ -472,6 +476,12 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
472 | mov pc, lr | 476 | mov pc, lr |
473 | ENDPROC(__setup_mmu) | 477 | ENDPROC(__setup_mmu) |
474 | 478 | ||
479 | __arm926ejs_mmu_cache_on: | ||
480 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
481 | mov r0, #4 @ put dcache in WT mode | ||
482 | mcr p15, 7, r0, c15, c0, 0 | ||
483 | #endif | ||
484 | |||
475 | __armv4_mmu_cache_on: | 485 | __armv4_mmu_cache_on: |
476 | mov r12, lr | 486 | mov r12, lr |
477 | #ifdef CONFIG_MMU | 487 | #ifdef CONFIG_MMU |
@@ -653,6 +663,12 @@ proc_types: | |||
653 | W(b) __armv4_mpu_cache_off | 663 | W(b) __armv4_mpu_cache_off |
654 | W(b) __armv4_mpu_cache_flush | 664 | W(b) __armv4_mpu_cache_flush |
655 | 665 | ||
666 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) | ||
667 | .word 0xff0ffff0 | ||
668 | b __arm926ejs_mmu_cache_on | ||
669 | b __armv4_mmu_cache_off | ||
670 | b __armv5tej_mmu_cache_flush | ||
671 | |||
656 | .word 0x00007000 @ ARM7 IDs | 672 | .word 0x00007000 @ ARM7 IDs |
657 | .word 0x0000f000 | 673 | .word 0x0000f000 |
658 | mov pc, lr | 674 | mov pc, lr |