aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-xsc3.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/proc-xsc3.S')
-rw-r--r--arch/arm/mm/proc-xsc3.S102
1 files changed, 21 insertions, 81 deletions
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index 596213699f3..1a2021cedc7 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -28,7 +28,6 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <asm/assembler.h> 29#include <asm/assembler.h>
30#include <asm/hwcap.h> 30#include <asm/hwcap.h>
31#include <mach/hardware.h>
32#include <asm/pgtable.h> 31#include <asm/pgtable.h>
33#include <asm/pgtable-hwdef.h> 32#include <asm/pgtable-hwdef.h>
34#include <asm/page.h> 33#include <asm/page.h>
@@ -335,17 +334,8 @@ ENTRY(xsc3_dma_unmap_area)
335 mov pc, lr 334 mov pc, lr
336ENDPROC(xsc3_dma_unmap_area) 335ENDPROC(xsc3_dma_unmap_area)
337 336
338ENTRY(xsc3_cache_fns) 337 @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S)
339 .long xsc3_flush_icache_all 338 define_cache_functions xsc3
340 .long xsc3_flush_kern_cache_all
341 .long xsc3_flush_user_cache_all
342 .long xsc3_flush_user_cache_range
343 .long xsc3_coherent_kern_range
344 .long xsc3_coherent_user_range
345 .long xsc3_flush_kern_dcache_area
346 .long xsc3_dma_map_area
347 .long xsc3_dma_unmap_area
348 .long xsc3_dma_flush_range
349 339
350ENTRY(cpu_xsc3_dcache_clean_area) 340ENTRY(cpu_xsc3_dcache_clean_area)
3511: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line 3411: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
@@ -385,7 +375,7 @@ cpu_xsc3_mt_table:
385 .long PTE_EXT_TEX(5) | PTE_CACHEABLE @ L_PTE_MT_WRITETHROUGH 375 .long PTE_EXT_TEX(5) | PTE_CACHEABLE @ L_PTE_MT_WRITETHROUGH
386 .long PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEBACK 376 .long PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEBACK
387 .long PTE_EXT_TEX(1) | PTE_BUFFERABLE @ L_PTE_MT_DEV_SHARED 377 .long PTE_EXT_TEX(1) | PTE_BUFFERABLE @ L_PTE_MT_DEV_SHARED
388 .long 0x00 @ unused 378 .long PTE_EXT_TEX(4) | PTE_BUFFERABLE @ L_PTE_MT_INNER_WB (not present?)
389 .long 0x00 @ L_PTE_MT_MINICACHE (not present) 379 .long 0x00 @ L_PTE_MT_MINICACHE (not present)
390 .long PTE_EXT_TEX(5) | PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEALLOC (not present?) 380 .long PTE_EXT_TEX(5) | PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEALLOC (not present?)
391 .long 0x00 @ unused 381 .long 0x00 @ unused
@@ -416,7 +406,7 @@ ENTRY(cpu_xsc3_set_pte_ext)
416 .align 406 .align
417 407
418.globl cpu_xsc3_suspend_size 408.globl cpu_xsc3_suspend_size
419.equ cpu_xsc3_suspend_size, 4 * 8 409.equ cpu_xsc3_suspend_size, 4 * 7
420#ifdef CONFIG_PM_SLEEP 410#ifdef CONFIG_PM_SLEEP
421ENTRY(cpu_xsc3_do_suspend) 411ENTRY(cpu_xsc3_do_suspend)
422 stmfd sp!, {r4 - r10, lr} 412 stmfd sp!, {r4 - r10, lr}
@@ -428,12 +418,12 @@ ENTRY(cpu_xsc3_do_suspend)
428 mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg 418 mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg
429 mrc p15, 0, r10, c1, c0, 0 @ control reg 419 mrc p15, 0, r10, c1, c0, 0 @ control reg
430 bic r4, r4, #2 @ clear frequency change bit 420 bic r4, r4, #2 @ clear frequency change bit
431 stmia r0, {r1, r4 - r10} @ store v:p offset + cp regs 421 stmia r0, {r4 - r10} @ store cp regs
432 ldmia sp!, {r4 - r10, pc} 422 ldmia sp!, {r4 - r10, pc}
433ENDPROC(cpu_xsc3_do_suspend) 423ENDPROC(cpu_xsc3_do_suspend)
434 424
435ENTRY(cpu_xsc3_do_resume) 425ENTRY(cpu_xsc3_do_resume)
436 ldmia r0, {r1, r4 - r10} @ load v:p offset + cp regs 426 ldmia r0, {r4 - r10} @ load cp regs
437 mov ip, #0 427 mov ip, #0
438 mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB 428 mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB
439 mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer 429 mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer
@@ -454,9 +444,6 @@ ENTRY(cpu_xsc3_do_resume)
454 ldr r3, =0x542e @ section flags 444 ldr r3, =0x542e @ section flags
455 b cpu_resume_mmu 445 b cpu_resume_mmu
456ENDPROC(cpu_xsc3_do_resume) 446ENDPROC(cpu_xsc3_do_resume)
457#else
458#define cpu_xsc3_do_suspend 0
459#define cpu_xsc3_do_resume 0
460#endif 447#endif
461 448
462 __CPUINIT 449 __CPUINIT
@@ -503,52 +490,24 @@ xsc3_crval:
503 490
504 __INITDATA 491 __INITDATA
505 492
506/* 493 @ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
507 * Purpose : Function pointers used to access above functions - all calls 494 define_processor_functions xsc3, dabort=v5t_early_abort, pabort=legacy_pabort, suspend=1
508 * come through these
509 */
510
511 .type xsc3_processor_functions, #object
512ENTRY(xsc3_processor_functions)
513 .word v5t_early_abort
514 .word legacy_pabort
515 .word cpu_xsc3_proc_init
516 .word cpu_xsc3_proc_fin
517 .word cpu_xsc3_reset
518 .word cpu_xsc3_do_idle
519 .word cpu_xsc3_dcache_clean_area
520 .word cpu_xsc3_switch_mm
521 .word cpu_xsc3_set_pte_ext
522 .word cpu_xsc3_suspend_size
523 .word cpu_xsc3_do_suspend
524 .word cpu_xsc3_do_resume
525 .size xsc3_processor_functions, . - xsc3_processor_functions
526 495
527 .section ".rodata" 496 .section ".rodata"
528 497
529 .type cpu_arch_name, #object 498 string cpu_arch_name, "armv5te"
530cpu_arch_name: 499 string cpu_elf_name, "v5"
531 .asciz "armv5te" 500 string cpu_xsc3_name, "XScale-V3 based processor"
532 .size cpu_arch_name, . - cpu_arch_name
533
534 .type cpu_elf_name, #object
535cpu_elf_name:
536 .asciz "v5"
537 .size cpu_elf_name, . - cpu_elf_name
538
539 .type cpu_xsc3_name, #object
540cpu_xsc3_name:
541 .asciz "XScale-V3 based processor"
542 .size cpu_xsc3_name, . - cpu_xsc3_name
543 501
544 .align 502 .align
545 503
546 .section ".proc.info.init", #alloc, #execinstr 504 .section ".proc.info.init", #alloc, #execinstr
547 505
548 .type __xsc3_proc_info,#object 506.macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req
549__xsc3_proc_info: 507 .type __\name\()_proc_info,#object
550 .long 0x69056000 508__\name\()_proc_info:
551 .long 0xffffe000 509 .long \cpu_val
510 .long \cpu_mask
552 .long PMD_TYPE_SECT | \ 511 .long PMD_TYPE_SECT | \
553 PMD_SECT_BUFFERABLE | \ 512 PMD_SECT_BUFFERABLE | \
554 PMD_SECT_CACHEABLE | \ 513 PMD_SECT_CACHEABLE | \
@@ -566,29 +525,10 @@ __xsc3_proc_info:
566 .long v4wbi_tlb_fns 525 .long v4wbi_tlb_fns
567 .long xsc3_mc_user_fns 526 .long xsc3_mc_user_fns
568 .long xsc3_cache_fns 527 .long xsc3_cache_fns
569 .size __xsc3_proc_info, . - __xsc3_proc_info 528 .size __\name\()_proc_info, . - __\name\()_proc_info
529.endm
570 530
571/* Note: PXA935 changed its implementor ID from Intel to Marvell */ 531 xsc3_proc_info xsc3, 0x69056000, 0xffffe000
572 532
573 .type __xsc3_pxa935_proc_info,#object 533/* Note: PXA935 changed its implementor ID from Intel to Marvell */
574__xsc3_pxa935_proc_info: 534 xsc3_proc_info xsc3_pxa935, 0x56056000, 0xffffe000
575 .long 0x56056000
576 .long 0xffffe000
577 .long PMD_TYPE_SECT | \
578 PMD_SECT_BUFFERABLE | \
579 PMD_SECT_CACHEABLE | \
580 PMD_SECT_AP_WRITE | \
581 PMD_SECT_AP_READ
582 .long PMD_TYPE_SECT | \
583 PMD_SECT_AP_WRITE | \
584 PMD_SECT_AP_READ
585 b __xsc3_setup
586 .long cpu_arch_name
587 .long cpu_elf_name
588 .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
589 .long cpu_xsc3_name
590 .long xsc3_processor_functions
591 .long v4wbi_tlb_fns
592 .long xsc3_mc_user_fns
593 .long xsc3_cache_fns
594 .size __xsc3_pxa935_proc_info, . - __xsc3_pxa935_proc_info