diff options
Diffstat (limited to 'arch/arm/mm/proc-sa1100.S')
-rw-r--r-- | arch/arm/mm/proc-sa1100.S | 101 |
1 files changed, 23 insertions, 78 deletions
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 184a9c997e3..69e7f2ef738 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -34,7 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | #define DCACHELINESIZE 32 | 35 | #define DCACHELINESIZE 32 |
36 | 36 | ||
37 | __INIT | 37 | .section .text |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * cpu_sa1100_proc_init() | 40 | * cpu_sa1100_proc_init() |
@@ -45,8 +45,6 @@ ENTRY(cpu_sa1100_proc_init) | |||
45 | mcr p15, 0, r0, c9, c0, 5 @ Allow read-buffer operations from userland | 45 | mcr p15, 0, r0, c9, c0, 5 @ Allow read-buffer operations from userland |
46 | mov pc, lr | 46 | mov pc, lr |
47 | 47 | ||
48 | .section .text | ||
49 | |||
50 | /* | 48 | /* |
51 | * cpu_sa1100_proc_fin() | 49 | * cpu_sa1100_proc_fin() |
52 | * | 50 | * |
@@ -184,11 +182,11 @@ ENDPROC(cpu_sa1100_do_suspend) | |||
184 | 182 | ||
185 | ENTRY(cpu_sa1100_do_resume) | 183 | ENTRY(cpu_sa1100_do_resume) |
186 | ldmia r0, {r4 - r7} @ load cp regs | 184 | ldmia r0, {r4 - r7} @ load cp regs |
187 | mov r1, #0 | 185 | mov ip, #0 |
188 | mcr p15, 0, r1, c8, c7, 0 @ flush I+D TLBs | 186 | mcr p15, 0, ip, c8, c7, 0 @ flush I+D TLBs |
189 | mcr p15, 0, r1, c7, c7, 0 @ flush I&D cache | 187 | mcr p15, 0, ip, c7, c7, 0 @ flush I&D cache |
190 | mcr p15, 0, r1, c9, c0, 0 @ invalidate RB | 188 | mcr p15, 0, ip, c9, c0, 0 @ invalidate RB |
191 | mcr p15, 0, r1, c9, c0, 5 @ allow user space to use RB | 189 | mcr p15, 0, ip, c9, c0, 5 @ allow user space to use RB |
192 | 190 | ||
193 | mcr p15, 0, r4, c3, c0, 0 @ domain ID | 191 | mcr p15, 0, r4, c3, c0, 0 @ domain ID |
194 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr | 192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr |
@@ -200,9 +198,6 @@ ENTRY(cpu_sa1100_do_resume) | |||
200 | PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE | 198 | PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE |
201 | b cpu_resume_mmu | 199 | b cpu_resume_mmu |
202 | ENDPROC(cpu_sa1100_do_resume) | 200 | ENDPROC(cpu_sa1100_do_resume) |
203 | #else | ||
204 | #define cpu_sa1100_do_suspend 0 | ||
205 | #define cpu_sa1100_do_resume 0 | ||
206 | #endif | 201 | #endif |
207 | 202 | ||
208 | __CPUINIT | 203 | __CPUINIT |
@@ -236,59 +231,28 @@ sa1100_crval: | |||
236 | __INITDATA | 231 | __INITDATA |
237 | 232 | ||
238 | /* | 233 | /* |
239 | * Purpose : Function pointers used to access above functions - all calls | ||
240 | * come through these | ||
241 | */ | ||
242 | |||
243 | /* | ||
244 | * SA1100 and SA1110 share the same function calls | 234 | * SA1100 and SA1110 share the same function calls |
245 | */ | 235 | */ |
246 | .type sa1100_processor_functions, #object | ||
247 | ENTRY(sa1100_processor_functions) | ||
248 | .word v4_early_abort | ||
249 | .word legacy_pabort | ||
250 | .word cpu_sa1100_proc_init | ||
251 | .word cpu_sa1100_proc_fin | ||
252 | .word cpu_sa1100_reset | ||
253 | .word cpu_sa1100_do_idle | ||
254 | .word cpu_sa1100_dcache_clean_area | ||
255 | .word cpu_sa1100_switch_mm | ||
256 | .word cpu_sa1100_set_pte_ext | ||
257 | .word cpu_sa1100_suspend_size | ||
258 | .word cpu_sa1100_do_suspend | ||
259 | .word cpu_sa1100_do_resume | ||
260 | .size sa1100_processor_functions, . - sa1100_processor_functions | ||
261 | |||
262 | .section ".rodata" | ||
263 | |||
264 | .type cpu_arch_name, #object | ||
265 | cpu_arch_name: | ||
266 | .asciz "armv4" | ||
267 | .size cpu_arch_name, . - cpu_arch_name | ||
268 | 236 | ||
269 | .type cpu_elf_name, #object | 237 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) |
270 | cpu_elf_name: | 238 | define_processor_functions sa1100, dabort=v4_early_abort, pabort=legacy_pabort, suspend=1 |
271 | .asciz "v4" | ||
272 | .size cpu_elf_name, . - cpu_elf_name | ||
273 | 239 | ||
274 | .type cpu_sa1100_name, #object | 240 | .section ".rodata" |
275 | cpu_sa1100_name: | ||
276 | .asciz "StrongARM-1100" | ||
277 | .size cpu_sa1100_name, . - cpu_sa1100_name | ||
278 | 241 | ||
279 | .type cpu_sa1110_name, #object | 242 | string cpu_arch_name, "armv4" |
280 | cpu_sa1110_name: | 243 | string cpu_elf_name, "v4" |
281 | .asciz "StrongARM-1110" | 244 | string cpu_sa1100_name, "StrongARM-1100" |
282 | .size cpu_sa1110_name, . - cpu_sa1110_name | 245 | string cpu_sa1110_name, "StrongARM-1110" |
283 | 246 | ||
284 | .align | 247 | .align |
285 | 248 | ||
286 | .section ".proc.info.init", #alloc, #execinstr | 249 | .section ".proc.info.init", #alloc, #execinstr |
287 | 250 | ||
288 | .type __sa1100_proc_info,#object | 251 | .macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req |
289 | __sa1100_proc_info: | 252 | .type __\name\()_proc_info,#object |
290 | .long 0x4401a110 | 253 | __\name\()_proc_info: |
291 | .long 0xfffffff0 | 254 | .long \cpu_val |
255 | .long \cpu_mask | ||
292 | .long PMD_TYPE_SECT | \ | 256 | .long PMD_TYPE_SECT | \ |
293 | PMD_SECT_BUFFERABLE | \ | 257 | PMD_SECT_BUFFERABLE | \ |
294 | PMD_SECT_CACHEABLE | \ | 258 | PMD_SECT_CACHEABLE | \ |
@@ -301,32 +265,13 @@ __sa1100_proc_info: | |||
301 | .long cpu_arch_name | 265 | .long cpu_arch_name |
302 | .long cpu_elf_name | 266 | .long cpu_elf_name |
303 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT | 267 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT |
304 | .long cpu_sa1100_name | 268 | .long \cpu_name |
305 | .long sa1100_processor_functions | 269 | .long sa1100_processor_functions |
306 | .long v4wb_tlb_fns | 270 | .long v4wb_tlb_fns |
307 | .long v4_mc_user_fns | 271 | .long v4_mc_user_fns |
308 | .long v4wb_cache_fns | 272 | .long v4wb_cache_fns |
309 | .size __sa1100_proc_info, . - __sa1100_proc_info | 273 | .size __\name\()_proc_info, . - __\name\()_proc_info |
274 | .endm | ||
310 | 275 | ||
311 | .type __sa1110_proc_info,#object | 276 | sa1100_proc_info sa1100, 0x4401a110, 0xfffffff0, cpu_sa1100_name |
312 | __sa1110_proc_info: | 277 | sa1100_proc_info sa1110, 0x6901b110, 0xfffffff0, cpu_sa1110_name |
313 | .long 0x6901b110 | ||
314 | .long 0xfffffff0 | ||
315 | .long PMD_TYPE_SECT | \ | ||
316 | PMD_SECT_BUFFERABLE | \ | ||
317 | PMD_SECT_CACHEABLE | \ | ||
318 | PMD_SECT_AP_WRITE | \ | ||
319 | PMD_SECT_AP_READ | ||
320 | .long PMD_TYPE_SECT | \ | ||
321 | PMD_SECT_AP_WRITE | \ | ||
322 | PMD_SECT_AP_READ | ||
323 | b __sa1100_setup | ||
324 | .long cpu_arch_name | ||
325 | .long cpu_elf_name | ||
326 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT | ||
327 | .long cpu_sa1110_name | ||
328 | .long sa1100_processor_functions | ||
329 | .long v4wb_tlb_fns | ||
330 | .long v4_mc_user_fns | ||
331 | .long v4wb_cache_fns | ||
332 | .size __sa1110_proc_info, . - __sa1110_proc_info | ||