aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-v6.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/proc-v6.S')
-rw-r--r--arch/arm/mm/proc-v6.S44
1 files changed, 19 insertions, 25 deletions
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index a923aa0fd00d..d061d2fa5506 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -128,20 +128,18 @@ ENTRY(cpu_v6_set_pte_ext)
128 128
129/* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ 129/* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */
130.globl cpu_v6_suspend_size 130.globl cpu_v6_suspend_size
131.equ cpu_v6_suspend_size, 4 * 8 131.equ cpu_v6_suspend_size, 4 * 6
132#ifdef CONFIG_PM_SLEEP 132#ifdef CONFIG_PM_SLEEP
133ENTRY(cpu_v6_do_suspend) 133ENTRY(cpu_v6_do_suspend)
134 stmfd sp!, {r4 - r11, lr} 134 stmfd sp!, {r4 - r9, lr}
135 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID 135 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
136 mrc p15, 0, r5, c13, c0, 1 @ Context ID 136 mrc p15, 0, r5, c3, c0, 0 @ Domain ID
137 mrc p15, 0, r6, c3, c0, 0 @ Domain ID 137 mrc p15, 0, r6, c2, c0, 1 @ Translation table base 1
138 mrc p15, 0, r7, c2, c0, 0 @ Translation table base 0 138 mrc p15, 0, r7, c1, c0, 1 @ auxiliary control register
139 mrc p15, 0, r8, c2, c0, 1 @ Translation table base 1 139 mrc p15, 0, r8, c1, c0, 2 @ co-processor access control
140 mrc p15, 0, r9, c1, c0, 1 @ auxiliary control register 140 mrc p15, 0, r9, c1, c0, 0 @ control register
141 mrc p15, 0, r10, c1, c0, 2 @ co-processor access control 141 stmia r0, {r4 - r9}
142 mrc p15, 0, r11, c1, c0, 0 @ control register 142 ldmfd sp!, {r4- r9, pc}
143 stmia r0, {r4 - r11}
144 ldmfd sp!, {r4- r11, pc}
145ENDPROC(cpu_v6_do_suspend) 143ENDPROC(cpu_v6_do_suspend)
146 144
147ENTRY(cpu_v6_do_resume) 145ENTRY(cpu_v6_do_resume)
@@ -150,25 +148,21 @@ ENTRY(cpu_v6_do_resume)
150 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache 148 mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
151 mcr p15, 0, ip, c7, c15, 0 @ clean+invalidate cache 149 mcr p15, 0, ip, c7, c15, 0 @ clean+invalidate cache
152 mcr p15, 0, ip, c7, c10, 4 @ drain write buffer 150 mcr p15, 0, ip, c7, c10, 4 @ drain write buffer
153 ldmia r0, {r4 - r11} 151 mcr p15, 0, ip, c13, c0, 1 @ set reserved context ID
152 ldmia r0, {r4 - r9}
154 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID 153 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID
155 mcr p15, 0, r5, c13, c0, 1 @ Context ID 154 mcr p15, 0, r5, c3, c0, 0 @ Domain ID
156 mcr p15, 0, r6, c3, c0, 0 @ Domain ID 155 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP)
157 mcr p15, 0, r7, c2, c0, 0 @ Translation table base 0 156 ALT_UP(orr r1, r1, #TTB_FLAGS_UP)
158 mcr p15, 0, r8, c2, c0, 1 @ Translation table base 1 157 mcr p15, 0, r1, c2, c0, 0 @ Translation table base 0
159 mcr p15, 0, r9, c1, c0, 1 @ auxiliary control register 158 mcr p15, 0, r6, c2, c0, 1 @ Translation table base 1
160 mcr p15, 0, r10, c1, c0, 2 @ co-processor access control 159 mcr p15, 0, r7, c1, c0, 1 @ auxiliary control register
160 mcr p15, 0, r8, c1, c0, 2 @ co-processor access control
161 mcr p15, 0, ip, c2, c0, 2 @ TTB control register 161 mcr p15, 0, ip, c2, c0, 2 @ TTB control register
162 mcr p15, 0, ip, c7, c5, 4 @ ISB 162 mcr p15, 0, ip, c7, c5, 4 @ ISB
163 mov r0, r11 @ control register 163 mov r0, r9 @ control register
164 mov r2, r7, lsr #14 @ get TTB0 base
165 mov r2, r2, lsl #14
166 ldr r3, cpu_resume_l1_flags
167 b cpu_resume_mmu 164 b cpu_resume_mmu
168ENDPROC(cpu_v6_do_resume) 165ENDPROC(cpu_v6_do_resume)
169cpu_resume_l1_flags:
170 ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP)
171 ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP)
172#endif 166#endif
173 167
174 string cpu_v6_name, "ARMv6-compatible processor" 168 string cpu_v6_name, "ARMv6-compatible processor"