be6c11d2b3fbf10092be644df37aba7787387004
[linux-2.6.git] / arch / arm / mm / proc-arm9tdmi.S
1 /*
2  *  linux/arch/arm/mm/proc-arm9tdmi.S: utility functions for ARM9TDMI
3  *
4  *  Copyright (C) 2003-2006 Hyok S. Choi <hyok.choi@samsung.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  */
11 #include <linux/linkage.h>
12 #include <linux/init.h>
13 #include <asm/assembler.h>
14 #include <asm/asm-offsets.h>
15 #include <asm/hwcap.h>
16 #include <asm/pgtable-hwdef.h>
17 #include <asm/pgtable.h>
18 #include <asm/ptrace.h>
19
20         .text
21 /*
22  * cpu_arm9tdmi_proc_init()
23  * cpu_arm9tdmi_do_idle()
24  * cpu_arm9tdmi_dcache_clean_area()
25  * cpu_arm9tdmi_switch_mm()
26  *
27  * These are not required.
28  */
29 ENTRY(cpu_arm9tdmi_proc_init)
30 ENTRY(cpu_arm9tdmi_do_idle)
31 ENTRY(cpu_arm9tdmi_dcache_clean_area)
32 ENTRY(cpu_arm9tdmi_switch_mm)
33                 mov     pc, lr
34
35 /*
36  * cpu_arm9tdmi_proc_fin()
37  */
38 ENTRY(cpu_arm9tdmi_proc_fin)
39                 mov     r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE
40                 msr     cpsr_c, r0
41                 mov     pc, lr
42
43 /*
44  * Function: cpu_arm9tdmi_reset(loc)
45  * Params  : loc(r0)    address to jump to
46  * Purpose : Sets up everything for a reset and jump to the location for soft reset.
47  */
48 ENTRY(cpu_arm9tdmi_reset)
49                 mov     pc, r0
50
51                 __INIT
52
53                 .type   __arm9tdmi_setup, #function
54 __arm9tdmi_setup:
55                 mov     pc, lr
56                 .size   __arm9tdmi_setup, . - __arm9tdmi_setup
57
58                 __INITDATA
59
60 /*
61  * Purpose : Function pointers used to access above functions - all calls
62  *           come through these
63  */
64                 .type   arm9tdmi_processor_functions, #object
65 ENTRY(arm9tdmi_processor_functions)
66                 .word   nommu_early_abort
67                 .word   pabort_noifar
68                 .word   cpu_arm9tdmi_proc_init
69                 .word   cpu_arm9tdmi_proc_fin
70                 .word   cpu_arm9tdmi_reset
71                 .word   cpu_arm9tdmi_do_idle
72                 .word   cpu_arm9tdmi_dcache_clean_area
73                 .word   cpu_arm9tdmi_switch_mm
74                 .word   0               @ cpu_*_set_pte
75                 .size   arm9tdmi_processor_functions, . - arm9tdmi_processor_functions
76
77                 .section ".rodata"
78
79                 .type   cpu_arch_name, #object
80 cpu_arch_name:
81                 .asciz  "armv4t"
82                 .size   cpu_arch_name, . - cpu_arch_name
83
84                 .type   cpu_elf_name, #object
85 cpu_elf_name:
86                 .asciz  "v4"
87                 .size   cpu_elf_name, . - cpu_elf_name
88
89                 .type   cpu_arm9tdmi_name, #object
90 cpu_arm9tdmi_name:
91                 .asciz  "ARM9TDMI"
92                 .size   cpu_arm9tdmi_name, . - cpu_arm9tdmi_name
93
94                 .type   cpu_p2001_name, #object
95 cpu_p2001_name:
96                 .asciz  "P2001"
97                 .size   cpu_p2001_name, . - cpu_p2001_name
98
99                 .align
100
101                 .section ".proc.info.init", #alloc, #execinstr
102
103                 .type   __arm9tdmi_proc_info, #object
104 __arm9tdmi_proc_info:
105                 .long   0x41009900
106                 .long   0xfff8ff00
107                 .long   0
108                 .long   0
109                 b       __arm9tdmi_setup
110                 .long   cpu_arch_name
111                 .long   cpu_elf_name
112                 .long   HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
113                 .long   cpu_arm9tdmi_name
114                 .long   arm9tdmi_processor_functions
115                 .long   0
116                 .long   0
117                 .long   v4_cache_fns
118                 .size   __arm9tdmi_proc_info, . - __arm9dmi_proc_info
119
120                 .type   __p2001_proc_info, #object
121 __p2001_proc_info:
122                 .long   0x41029000
123                 .long   0xffffffff
124                 .long   0
125                 .long   0
126                 b       __arm9tdmi_setup
127                 .long   cpu_arch_name
128                 .long   cpu_elf_name
129                 .long   HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
130                 .long   cpu_p2001_name
131                 .long   arm9tdmi_processor_functions
132                 .long   0
133                 .long   0
134                 .long   v4_cache_fns
135                 .size   __p2001_proc_info, . - __p2001_proc_info