ARM: mm: proc-arm7tdmi: Use the new processor struct macros

Signed-off-by: Dave Martin <dave.martin@linaro.org>
This commit is contained in:
Dave Martin 2011-06-23 17:19:26 +01:00
parent 4cc1f0fa06
commit fd10e2725e
1 changed files with 38 additions and 176 deletions

View File

@ -17,6 +17,8 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include "proc-macros.S"
.text .text
/* /*
* cpu_arm7tdmi_proc_init() * cpu_arm7tdmi_proc_init()
@ -55,197 +57,57 @@ __arm7tdmi_setup:
__INITDATA __INITDATA
/* @ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
* Purpose : Function pointers used to access above functions - all calls define_processor_functions arm7tdmi, dabort=v4t_late_abort, pabort=legacy_pabort, nommu=1
* come through these
*/
.type arm7tdmi_processor_functions, #object
ENTRY(arm7tdmi_processor_functions)
.word v4t_late_abort
.word legacy_pabort
.word cpu_arm7tdmi_proc_init
.word cpu_arm7tdmi_proc_fin
.word cpu_arm7tdmi_reset
.word cpu_arm7tdmi_do_idle
.word cpu_arm7tdmi_dcache_clean_area
.word cpu_arm7tdmi_switch_mm
.word 0 @ cpu_*_set_pte
.word 0
.word 0
.word 0
.size arm7tdmi_processor_functions, . - arm7tdmi_processor_functions
.section ".rodata" .section ".rodata"
.type cpu_arch_name, #object string cpu_arch_name, "armv4t"
cpu_arch_name: string cpu_elf_name, "v4"
.asciz "armv4t" string cpu_arm7tdmi_name, "ARM7TDMI"
.size cpu_arch_name, . - cpu_arch_name string cpu_triscenda7_name, "Triscend-A7x"
string cpu_at91_name, "Atmel-AT91M40xxx"
.type cpu_elf_name, #object string cpu_s3c3410_name, "Samsung-S3C3410"
cpu_elf_name: string cpu_s3c44b0x_name, "Samsung-S3C44B0x"
.asciz "v4" string cpu_s3c4510b_name, "Samsung-S3C4510B"
.size cpu_elf_name, . - cpu_elf_name string cpu_s3c4530_name, "Samsung-S3C4530"
string cpu_netarm_name, "NETARM"
.type cpu_arm7tdmi_name, #object
cpu_arm7tdmi_name:
.asciz "ARM7TDMI"
.size cpu_arm7tdmi_name, . - cpu_arm7tdmi_name
.type cpu_triscenda7_name, #object
cpu_triscenda7_name:
.asciz "Triscend-A7x"
.size cpu_triscenda7_name, . - cpu_triscenda7_name
.type cpu_at91_name, #object
cpu_at91_name:
.asciz "Atmel-AT91M40xxx"
.size cpu_at91_name, . - cpu_at91_name
.type cpu_s3c3410_name, #object
cpu_s3c3410_name:
.asciz "Samsung-S3C3410"
.size cpu_s3c3410_name, . - cpu_s3c3410_name
.type cpu_s3c44b0x_name, #object
cpu_s3c44b0x_name:
.asciz "Samsung-S3C44B0x"
.size cpu_s3c44b0x_name, . - cpu_s3c44b0x_name
.type cpu_s3c4510b, #object
cpu_s3c4510b_name:
.asciz "Samsung-S3C4510B"
.size cpu_s3c4510b_name, . - cpu_s3c4510b_name
.type cpu_s3c4530_name, #object
cpu_s3c4530_name:
.asciz "Samsung-S3C4530"
.size cpu_s3c4530_name, . - cpu_s3c4530_name
.type cpu_netarm_name, #object
cpu_netarm_name:
.asciz "NETARM"
.size cpu_netarm_name, . - cpu_netarm_name
.align .align
.section ".proc.info.init", #alloc, #execinstr .section ".proc.info.init", #alloc, #execinstr
.type __arm7tdmi_proc_info, #object .macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \
__arm7tdmi_proc_info: extra_hwcaps=0
.long 0x41007700 .type __\name\()_proc_info, #object
.long 0xfff8ff00 __\name\()_proc_info:
.long \cpu_val
.long \cpu_mask
.long 0 .long 0
.long 0 .long 0
b __arm7tdmi_setup b __arm7tdmi_setup
.long cpu_arch_name .long cpu_arch_name
.long cpu_elf_name .long cpu_elf_name
.long HWCAP_SWP | HWCAP_26BIT .long HWCAP_SWP | HWCAP_26BIT | ( \extra_hwcaps )
.long cpu_arm7tdmi_name .long \cpu_name
.long arm7tdmi_processor_functions .long arm7tdmi_processor_functions
.long 0 .long 0
.long 0 .long 0
.long v4_cache_fns .long v4_cache_fns
.size __arm7tdmi_proc_info, . - __arm7tdmi_proc_info .size __\name\()_proc_info, . - __\name\()_proc_info
.endm
.type __triscenda7_proc_info, #object arm7tdmi_proc_info arm7tdmi, 0x41007700, 0xfff8ff00, \
__triscenda7_proc_info: cpu_arm7tdmi_name
.long 0x0001d2ff arm7tdmi_proc_info triscenda7, 0x0001d2ff, 0x0001ffff, \
.long 0x0001ffff cpu_triscenda7_name, extra_hwcaps=HWCAP_THUMB
.long 0 arm7tdmi_proc_info at91, 0x14000040, 0xfff000e0, \
.long 0 cpu_at91_name, extra_hwcaps=HWCAP_THUMB
b __arm7tdmi_setup arm7tdmi_proc_info s3c4510b, 0x36365000, 0xfffff000, \
.long cpu_arch_name cpu_s3c4510b_name, extra_hwcaps=HWCAP_THUMB
.long cpu_elf_name arm7tdmi_proc_info s3c4530, 0x4c000000, 0xfff000e0, \
.long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT cpu_s3c4530_name, extra_hwcaps=HWCAP_THUMB
.long cpu_triscenda7_name arm7tdmi_proc_info s3c3410, 0x34100000, 0xffff0000, \
.long arm7tdmi_processor_functions cpu_s3c3410_name, extra_hwcaps=HWCAP_THUMB
.long 0 arm7tdmi_proc_info s3c44b0x, 0x44b00000, 0xffff0000, \
.long 0 cpu_s3c44b0x_name, extra_hwcaps=HWCAP_THUMB
.long v4_cache_fns
.size __triscenda7_proc_info, . - __triscenda7_proc_info
.type __at91_proc_info, #object
__at91_proc_info:
.long 0x14000040
.long 0xfff000e0
.long 0
.long 0
b __arm7tdmi_setup
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
.long cpu_at91_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size __at91_proc_info, . - __at91_proc_info
.type __s3c4510b_proc_info, #object
__s3c4510b_proc_info:
.long 0x36365000
.long 0xfffff000
.long 0
.long 0
b __arm7tdmi_setup
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
.long cpu_s3c4510b_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size __s3c4510b_proc_info, . - __s3c4510b_proc_info
.type __s3c4530_proc_info, #object
__s3c4530_proc_info:
.long 0x4c000000
.long 0xfff000e0
.long 0
.long 0
b __arm7tdmi_setup
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
.long cpu_s3c4530_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size __s3c4530_proc_info, . - __s3c4530_proc_info
.type __s3c3410_proc_info, #object
__s3c3410_proc_info:
.long 0x34100000
.long 0xffff0000
.long 0
.long 0
b __arm7tdmi_setup
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
.long cpu_s3c3410_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size __s3c3410_proc_info, . - __s3c3410_proc_info
.type __s3c44b0x_proc_info, #object
__s3c44b0x_proc_info:
.long 0x44b00000
.long 0xffff0000
.long 0
.long 0
b __arm7tdmi_setup
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
.long cpu_s3c44b0x_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size __s3c44b0x_proc_info, . - __s3c44b0x_proc_info