diff options
Diffstat (limited to 'arch/arm/mm/proc-v6.S')
-rw-r--r-- | arch/arm/mm/proc-v6.S | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 1d2b8451bf2..a923aa0fd00 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -56,6 +56,11 @@ ENTRY(cpu_v6_proc_fin) | |||
56 | */ | 56 | */ |
57 | .align 5 | 57 | .align 5 |
58 | ENTRY(cpu_v6_reset) | 58 | ENTRY(cpu_v6_reset) |
59 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | ||
60 | bic r1, r1, #0x1 @ ...............m | ||
61 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU | ||
62 | mov r1, #0 | ||
63 | mcr p15, 0, r1, c7, c5, 4 @ ISB | ||
59 | mov pc, r0 | 64 | mov pc, r0 |
60 | 65 | ||
61 | /* | 66 | /* |
@@ -164,16 +169,9 @@ ENDPROC(cpu_v6_do_resume) | |||
164 | cpu_resume_l1_flags: | 169 | cpu_resume_l1_flags: |
165 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP) | 170 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP) |
166 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP) | 171 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP) |
167 | #else | ||
168 | #define cpu_v6_do_suspend 0 | ||
169 | #define cpu_v6_do_resume 0 | ||
170 | #endif | 172 | #endif |
171 | 173 | ||
172 | 174 | string cpu_v6_name, "ARMv6-compatible processor" | |
173 | .type cpu_v6_name, #object | ||
174 | cpu_v6_name: | ||
175 | .asciz "ARMv6-compatible processor" | ||
176 | .size cpu_v6_name, . - cpu_v6_name | ||
177 | 175 | ||
178 | .align | 176 | .align |
179 | 177 | ||
@@ -225,6 +223,22 @@ __v6_setup: | |||
225 | mrc p15, 0, r0, c1, c0, 0 @ read control register | 223 | mrc p15, 0, r0, c1, c0, 0 @ read control register |
226 | bic r0, r0, r5 @ clear bits them | 224 | bic r0, r0, r5 @ clear bits them |
227 | orr r0, r0, r6 @ set them | 225 | orr r0, r0, r6 @ set them |
226 | #ifdef CONFIG_ARM_ERRATA_364296 | ||
227 | /* | ||
228 | * Workaround for the 364296 ARM1136 r0p2 erratum (possible cache data | ||
229 | * corruption with hit-under-miss enabled). The conditional code below | ||
230 | * (setting the undocumented bit 31 in the auxiliary control register | ||
231 | * and the FI bit in the control register) disables hit-under-miss | ||
232 | * without putting the processor into full low interrupt latency mode. | ||
233 | */ | ||
234 | ldr r6, =0x4107b362 @ id for ARM1136 r0p2 | ||
235 | mrc p15, 0, r5, c0, c0, 0 @ get processor id | ||
236 | teq r5, r6 @ check for the faulty core | ||
237 | mrceq p15, 0, r5, c1, c0, 1 @ load aux control reg | ||
238 | orreq r5, r5, #(1 << 31) @ set the undocumented bit 31 | ||
239 | mcreq p15, 0, r5, c1, c0, 1 @ write aux control reg | ||
240 | orreq r0, r0, #(1 << 21) @ low interrupt latency configuration | ||
241 | #endif | ||
228 | mov pc, lr @ return to head.S:__ret | 242 | mov pc, lr @ return to head.S:__ret |
229 | 243 | ||
230 | /* | 244 | /* |
@@ -239,33 +253,13 @@ v6_crval: | |||
239 | 253 | ||
240 | __INITDATA | 254 | __INITDATA |
241 | 255 | ||
242 | .type v6_processor_functions, #object | 256 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) |
243 | ENTRY(v6_processor_functions) | 257 | define_processor_functions v6, dabort=v6_early_abort, pabort=v6_pabort, suspend=1 |
244 | .word v6_early_abort | ||
245 | .word v6_pabort | ||
246 | .word cpu_v6_proc_init | ||
247 | .word cpu_v6_proc_fin | ||
248 | .word cpu_v6_reset | ||
249 | .word cpu_v6_do_idle | ||
250 | .word cpu_v6_dcache_clean_area | ||
251 | .word cpu_v6_switch_mm | ||
252 | .word cpu_v6_set_pte_ext | ||
253 | .word cpu_v6_suspend_size | ||
254 | .word cpu_v6_do_suspend | ||
255 | .word cpu_v6_do_resume | ||
256 | .size v6_processor_functions, . - v6_processor_functions | ||
257 | 258 | ||
258 | .section ".rodata" | 259 | .section ".rodata" |
259 | 260 | ||
260 | .type cpu_arch_name, #object | 261 | string cpu_arch_name, "armv6" |
261 | cpu_arch_name: | 262 | string cpu_elf_name, "v6" |
262 | .asciz "armv6" | ||
263 | .size cpu_arch_name, . - cpu_arch_name | ||
264 | |||
265 | .type cpu_elf_name, #object | ||
266 | cpu_elf_name: | ||
267 | .asciz "v6" | ||
268 | .size cpu_elf_name, . - cpu_elf_name | ||
269 | .align | 263 | .align |
270 | 264 | ||
271 | .section ".proc.info.init", #alloc, #execinstr | 265 | .section ".proc.info.init", #alloc, #execinstr |