aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/compressed/head.S
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:35:06 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:35:06 -0400
commit8bdca0ac2b1ec35091941c57b4202f7096291c5b (patch)
treead36d5beb71f06a6938afb4ded21070e6fa4fd3c /arch/arm/boot/compressed/head.S
parent0e0fe9219d2e5426d87a0f62db445010d4aba2c7 (diff)
nommu: Fix compressed/head.S to not perform MMU specific operations
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/boot/compressed/head.S')
-rw-r--r--arch/arm/boot/compressed/head.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index bd60e8369879..fa6fbf45cf3b 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -438,6 +438,7 @@ ENDPROC(__setup_mmu)
438 438
439__armv4_mmu_cache_on: 439__armv4_mmu_cache_on:
440 mov r12, lr 440 mov r12, lr
441#ifdef CONFIG_MMU
441 bl __setup_mmu 442 bl __setup_mmu
442 mov r0, #0 443 mov r0, #0
443 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer 444 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
@@ -451,10 +452,12 @@ __armv4_mmu_cache_on:
451 bl __common_mmu_cache_on 452 bl __common_mmu_cache_on
452 mov r0, #0 453 mov r0, #0
453 mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs 454 mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
455#endif
454 mov pc, r12 456 mov pc, r12
455 457
456__armv7_mmu_cache_on: 458__armv7_mmu_cache_on:
457 mov r12, lr 459 mov r12, lr
460#ifdef CONFIG_MMU
458 mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 461 mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0
459 tst r11, #0xf @ VMSA 462 tst r11, #0xf @ VMSA
460 blne __setup_mmu 463 blne __setup_mmu
@@ -462,9 +465,11 @@ __armv7_mmu_cache_on:
462 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer 465 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
463 tst r11, #0xf @ VMSA 466 tst r11, #0xf @ VMSA
464 mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs 467 mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs
468#endif
465 mrc p15, 0, r0, c1, c0, 0 @ read control reg 469 mrc p15, 0, r0, c1, c0, 0 @ read control reg
466 orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement 470 orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement
467 orr r0, r0, #0x003c @ write buffer 471 orr r0, r0, #0x003c @ write buffer
472#ifdef CONFIG_MMU
468#ifdef CONFIG_CPU_ENDIAN_BE8 473#ifdef CONFIG_CPU_ENDIAN_BE8
469 orr r0, r0, #1 << 25 @ big-endian page tables 474 orr r0, r0, #1 << 25 @ big-endian page tables
470#endif 475#endif
@@ -472,6 +477,7 @@ __armv7_mmu_cache_on:
472 movne r1, #-1 477 movne r1, #-1
473 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer 478 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
474 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control 479 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
480#endif
475 mcr p15, 0, r0, c1, c0, 0 @ load control register 481 mcr p15, 0, r0, c1, c0, 0 @ load control register
476 mrc p15, 0, r0, c1, c0, 0 @ and read it back 482 mrc p15, 0, r0, c1, c0, 0 @ and read it back
477 mov r0, #0 483 mov r0, #0
@@ -785,22 +791,30 @@ __armv3_mpu_cache_off:
785 mov pc, lr 791 mov pc, lr
786 792
787__armv4_mmu_cache_off: 793__armv4_mmu_cache_off:
794#ifdef CONFIG_MMU
788 mrc p15, 0, r0, c1, c0 795 mrc p15, 0, r0, c1, c0
789 bic r0, r0, #0x000d 796 bic r0, r0, #0x000d
790 mcr p15, 0, r0, c1, c0 @ turn MMU and cache off 797 mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
791 mov r0, #0 798 mov r0, #0
792 mcr p15, 0, r0, c7, c7 @ invalidate whole cache v4 799 mcr p15, 0, r0, c7, c7 @ invalidate whole cache v4
793 mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4 800 mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4
801#endif
794 mov pc, lr 802 mov pc, lr
795 803
796__armv7_mmu_cache_off: 804__armv7_mmu_cache_off:
797 mrc p15, 0, r0, c1, c0 805 mrc p15, 0, r0, c1, c0
806#ifdef CONFIG_MMU
798 bic r0, r0, #0x000d 807 bic r0, r0, #0x000d
808#else
809 bic r0, r0, #0x000c
810#endif
799 mcr p15, 0, r0, c1, c0 @ turn MMU and cache off 811 mcr p15, 0, r0, c1, c0 @ turn MMU and cache off
800 mov r12, lr 812 mov r12, lr
801 bl __armv7_mmu_cache_flush 813 bl __armv7_mmu_cache_flush
802 mov r0, #0 814 mov r0, #0
815#ifdef CONFIG_MMU
803 mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB 816 mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB
817#endif
804 mcr p15, 0, r0, c7, c5, 6 @ invalidate BTC 818 mcr p15, 0, r0, c7, c5, 6 @ invalidate BTC
805 mcr p15, 0, r0, c7, c10, 4 @ DSB 819 mcr p15, 0, r0, c7, c10, 4 @ DSB
806 mcr p15, 0, r0, c7, c5, 4 @ ISB 820 mcr p15, 0, r0, c7, c5, 4 @ ISB