| Hyok S. Choi | 07e0da7 | 2006-09-26 17:37:36 +0900 | [diff] [blame] | 1 | /* | 
|  | 2 | *  linux/arch/arm/mm/proc-arm7tdmi.S: utility functions for ARM7TDMI | 
|  | 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> | 
| Russell King | 5ec9407 | 2008-09-07 19:15:31 +0100 | [diff] [blame] | 15 | #include <asm/hwcap.h> | 
| Hyok S. Choi | 07e0da7 | 2006-09-26 17:37:36 +0900 | [diff] [blame] | 16 | #include <asm/pgtable-hwdef.h> | 
|  | 17 | #include <asm/pgtable.h> | 
| Hyok S. Choi | 07e0da7 | 2006-09-26 17:37:36 +0900 | [diff] [blame] | 18 | #include <asm/ptrace.h> | 
|  | 19 |  | 
|  | 20 | .text | 
|  | 21 | /* | 
|  | 22 | * cpu_arm7tdmi_proc_init() | 
|  | 23 | * cpu_arm7tdmi_do_idle() | 
|  | 24 | * cpu_arm7tdmi_dcache_clean_area() | 
|  | 25 | * cpu_arm7tdmi_switch_mm() | 
|  | 26 | * | 
|  | 27 | * These are not required. | 
|  | 28 | */ | 
|  | 29 | ENTRY(cpu_arm7tdmi_proc_init) | 
|  | 30 | ENTRY(cpu_arm7tdmi_do_idle) | 
|  | 31 | ENTRY(cpu_arm7tdmi_dcache_clean_area) | 
|  | 32 | ENTRY(cpu_arm7tdmi_switch_mm) | 
|  | 33 | mov	pc, lr | 
|  | 34 |  | 
|  | 35 | /* | 
|  | 36 | * cpu_arm7tdmi_proc_fin() | 
|  | 37 | */ | 
|  | 38 | ENTRY(cpu_arm7tdmi_proc_fin) | 
| Hyok S. Choi | 07e0da7 | 2006-09-26 17:37:36 +0900 | [diff] [blame] | 39 | mov	pc, lr | 
|  | 40 |  | 
|  | 41 | /* | 
|  | 42 | * Function: cpu_arm7tdmi_reset(loc) | 
|  | 43 | * Params  : loc(r0)	address to jump to | 
|  | 44 | * Purpose : Sets up everything for a reset and jump to the location for soft reset. | 
|  | 45 | */ | 
|  | 46 | ENTRY(cpu_arm7tdmi_reset) | 
|  | 47 | mov	pc, r0 | 
|  | 48 |  | 
|  | 49 | __INIT | 
|  | 50 |  | 
|  | 51 | .type	__arm7tdmi_setup, #function | 
|  | 52 | __arm7tdmi_setup: | 
|  | 53 | mov	pc, lr | 
|  | 54 | .size	__arm7tdmi_setup, . - __arm7tdmi_setup | 
|  | 55 |  | 
|  | 56 | __INITDATA | 
|  | 57 |  | 
|  | 58 | /* | 
|  | 59 | * Purpose : Function pointers used to access above functions - all calls | 
|  | 60 | *	     come through these | 
|  | 61 | */ | 
|  | 62 | .type	arm7tdmi_processor_functions, #object | 
|  | 63 | ENTRY(arm7tdmi_processor_functions) | 
|  | 64 | .word	v4t_late_abort | 
| Kirill A. Shutemov | 4fb2847 | 2009-09-25 13:39:47 +0100 | [diff] [blame] | 65 | .word	legacy_pabort | 
| Hyok S. Choi | 07e0da7 | 2006-09-26 17:37:36 +0900 | [diff] [blame] | 66 | .word	cpu_arm7tdmi_proc_init | 
|  | 67 | .word	cpu_arm7tdmi_proc_fin | 
|  | 68 | .word	cpu_arm7tdmi_reset | 
|  | 69 | .word	cpu_arm7tdmi_do_idle | 
|  | 70 | .word	cpu_arm7tdmi_dcache_clean_area | 
|  | 71 | .word	cpu_arm7tdmi_switch_mm | 
|  | 72 | .word	0		@ cpu_*_set_pte | 
|  | 73 | .size	arm7tdmi_processor_functions, . - arm7tdmi_processor_functions | 
|  | 74 |  | 
|  | 75 | .section ".rodata" | 
|  | 76 |  | 
|  | 77 | .type	cpu_arch_name, #object | 
|  | 78 | cpu_arch_name: | 
|  | 79 | .asciz	"armv4t" | 
|  | 80 | .size	cpu_arch_name, . - cpu_arch_name | 
|  | 81 |  | 
|  | 82 | .type	cpu_elf_name, #object | 
|  | 83 | cpu_elf_name: | 
|  | 84 | .asciz	"v4" | 
|  | 85 | .size	cpu_elf_name, . - cpu_elf_name | 
|  | 86 |  | 
|  | 87 | .type	cpu_arm7tdmi_name, #object | 
|  | 88 | cpu_arm7tdmi_name: | 
|  | 89 | .asciz	"ARM7TDMI" | 
|  | 90 | .size	cpu_arm7tdmi_name, . - cpu_arm7tdmi_name | 
|  | 91 |  | 
|  | 92 | .type	cpu_triscenda7_name, #object | 
|  | 93 | cpu_triscenda7_name: | 
|  | 94 | .asciz	"Triscend-A7x" | 
|  | 95 | .size	cpu_triscenda7_name, . - cpu_triscenda7_name | 
|  | 96 |  | 
|  | 97 | .type	cpu_at91_name, #object | 
|  | 98 | cpu_at91_name: | 
|  | 99 | .asciz	"Atmel-AT91M40xxx" | 
|  | 100 | .size	cpu_at91_name, . - cpu_at91_name | 
|  | 101 |  | 
|  | 102 | .type	cpu_s3c3410_name, #object | 
|  | 103 | cpu_s3c3410_name: | 
|  | 104 | .asciz	"Samsung-S3C3410" | 
|  | 105 | .size	cpu_s3c3410_name, . - cpu_s3c3410_name | 
|  | 106 |  | 
|  | 107 | .type	cpu_s3c44b0x_name, #object | 
|  | 108 | cpu_s3c44b0x_name: | 
|  | 109 | .asciz	"Samsung-S3C44B0x" | 
|  | 110 | .size	cpu_s3c44b0x_name, . - cpu_s3c44b0x_name | 
|  | 111 |  | 
|  | 112 | .type	cpu_s3c4510b, #object | 
|  | 113 | cpu_s3c4510b_name: | 
|  | 114 | .asciz	"Samsung-S3C4510B" | 
|  | 115 | .size	cpu_s3c4510b_name, . - cpu_s3c4510b_name | 
|  | 116 |  | 
|  | 117 | .type	cpu_s3c4530_name, #object | 
|  | 118 | cpu_s3c4530_name: | 
|  | 119 | .asciz	"Samsung-S3C4530" | 
|  | 120 | .size	cpu_s3c4530_name, . - cpu_s3c4530_name | 
|  | 121 |  | 
|  | 122 | .type	cpu_netarm_name, #object | 
|  | 123 | cpu_netarm_name: | 
|  | 124 | .asciz	"NETARM" | 
|  | 125 | .size	cpu_netarm_name, . - cpu_netarm_name | 
|  | 126 |  | 
|  | 127 | .align | 
|  | 128 |  | 
|  | 129 | .section ".proc.info.init", #alloc, #execinstr | 
|  | 130 |  | 
|  | 131 | .type	__arm7tdmi_proc_info, #object | 
|  | 132 | __arm7tdmi_proc_info: | 
|  | 133 | .long	0x41007700 | 
|  | 134 | .long	0xfff8ff00 | 
|  | 135 | .long	0 | 
|  | 136 | .long	0 | 
|  | 137 | b	__arm7tdmi_setup | 
|  | 138 | .long	cpu_arch_name | 
|  | 139 | .long	cpu_elf_name | 
|  | 140 | .long	HWCAP_SWP | HWCAP_26BIT | 
|  | 141 | .long	cpu_arm7tdmi_name | 
|  | 142 | .long	arm7tdmi_processor_functions | 
|  | 143 | .long	0 | 
|  | 144 | .long	0 | 
|  | 145 | .long	v4_cache_fns | 
|  | 146 | .size	__arm7tdmi_proc_info, . - __arm7dmi_proc_info | 
|  | 147 |  | 
|  | 148 | .type	__triscenda7_proc_info, #object | 
|  | 149 | __triscenda7_proc_info: | 
|  | 150 | .long	0x0001d2ff | 
|  | 151 | .long	0x0001ffff | 
|  | 152 | .long	0 | 
|  | 153 | .long	0 | 
|  | 154 | b	__arm7tdmi_setup | 
|  | 155 | .long	cpu_arch_name | 
|  | 156 | .long	cpu_elf_name | 
|  | 157 | .long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT | 
|  | 158 | .long	cpu_triscenda7_name | 
|  | 159 | .long	arm7tdmi_processor_functions | 
|  | 160 | .long	0 | 
|  | 161 | .long	0 | 
|  | 162 | .long	v4_cache_fns | 
|  | 163 | .size	__triscenda7_proc_info, . - __triscenda7_proc_info | 
|  | 164 |  | 
|  | 165 | .type	__at91_proc_info, #object | 
|  | 166 | __at91_proc_info: | 
|  | 167 | .long	0x14000040 | 
|  | 168 | .long	0xfff000e0 | 
|  | 169 | .long	0 | 
|  | 170 | .long	0 | 
|  | 171 | b	__arm7tdmi_setup | 
|  | 172 | .long	cpu_arch_name | 
|  | 173 | .long	cpu_elf_name | 
|  | 174 | .long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT | 
|  | 175 | .long	cpu_at91_name | 
|  | 176 | .long	arm7tdmi_processor_functions | 
|  | 177 | .long	0 | 
|  | 178 | .long	0 | 
|  | 179 | .long	v4_cache_fns | 
|  | 180 | .size	__at91_proc_info, . - __at91_proc_info | 
|  | 181 |  | 
|  | 182 | .type	__s3c4510b_proc_info, #object | 
|  | 183 | __s3c4510b_proc_info: | 
|  | 184 | .long	0x36365000 | 
|  | 185 | .long	0xfffff000 | 
|  | 186 | .long	0 | 
|  | 187 | .long	0 | 
|  | 188 | b	__arm7tdmi_setup | 
|  | 189 | .long	cpu_arch_name | 
|  | 190 | .long	cpu_elf_name | 
|  | 191 | .long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT | 
|  | 192 | .long	cpu_s3c4510b_name | 
|  | 193 | .long	arm7tdmi_processor_functions | 
|  | 194 | .long	0 | 
|  | 195 | .long	0 | 
|  | 196 | .long	v4_cache_fns | 
|  | 197 | .size	__s3c4510b_proc_info, . - __s3c4510b_proc_info | 
|  | 198 |  | 
|  | 199 | .type	__s3c4530_proc_info, #object | 
|  | 200 | __s3c4530_proc_info: | 
|  | 201 | .long	0x4c000000 | 
|  | 202 | .long	0xfff000e0 | 
|  | 203 | .long	0 | 
|  | 204 | .long	0 | 
|  | 205 | b	__arm7tdmi_setup | 
|  | 206 | .long	cpu_arch_name | 
|  | 207 | .long	cpu_elf_name | 
|  | 208 | .long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT | 
|  | 209 | .long	cpu_s3c4530_name | 
|  | 210 | .long	arm7tdmi_processor_functions | 
|  | 211 | .long	0 | 
|  | 212 | .long	0 | 
|  | 213 | .long	v4_cache_fns | 
|  | 214 | .size	__s3c4530_proc_info, . - __s3c4530_proc_info | 
|  | 215 |  | 
|  | 216 | .type	__s3c3410_proc_info, #object | 
|  | 217 | __s3c3410_proc_info: | 
|  | 218 | .long	0x34100000 | 
|  | 219 | .long	0xffff0000 | 
|  | 220 | .long	0 | 
|  | 221 | .long	0 | 
|  | 222 | b	__arm7tdmi_setup | 
|  | 223 | .long	cpu_arch_name | 
|  | 224 | .long	cpu_elf_name | 
|  | 225 | .long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT | 
|  | 226 | .long	cpu_s3c3410_name | 
|  | 227 | .long	arm7tdmi_processor_functions | 
|  | 228 | .long	0 | 
|  | 229 | .long	0 | 
|  | 230 | .long	v4_cache_fns | 
|  | 231 | .size	__s3c3410_proc_info, . - __s3c3410_proc_info | 
|  | 232 |  | 
|  | 233 | .type	__s3c44b0x_proc_info, #object | 
|  | 234 | __s3c44b0x_proc_info: | 
|  | 235 | .long	0x44b00000 | 
|  | 236 | .long	0xffff0000 | 
|  | 237 | .long	0 | 
|  | 238 | .long	0 | 
|  | 239 | b	__arm7tdmi_setup | 
|  | 240 | .long	cpu_arch_name | 
|  | 241 | .long	cpu_elf_name | 
|  | 242 | .long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT | 
|  | 243 | .long	cpu_s3c44b0x_name | 
|  | 244 | .long	arm7tdmi_processor_functions | 
|  | 245 | .long	0 | 
|  | 246 | .long	0 | 
|  | 247 | .long	v4_cache_fns | 
|  | 248 | .size	__s3c44b0x_proc_info, . - __s3c44b0x_proc_info |