xref: /linux/arch/arm/mm/proc-arm9tdmi.S (revision 5085f3ff458521045f7e43da62b8c30ea7df2e82)
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 */
29ENTRY(cpu_arm9tdmi_proc_init)
30ENTRY(cpu_arm9tdmi_do_idle)
31ENTRY(cpu_arm9tdmi_dcache_clean_area)
32ENTRY(cpu_arm9tdmi_switch_mm)
33		mov	pc, lr
34
35/*
36 * cpu_arm9tdmi_proc_fin()
37 */
38ENTRY(cpu_arm9tdmi_proc_fin)
39		mov	pc, lr
40
41/*
42 * Function: cpu_arm9tdmi_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 */
46ENTRY(cpu_arm9tdmi_reset)
47		mov	pc, r0
48
49		__CPUINIT
50
51		.type	__arm9tdmi_setup, #function
52__arm9tdmi_setup:
53		mov	pc, lr
54		.size	__arm9tdmi_setup, . - __arm9tdmi_setup
55
56		__INITDATA
57
58/*
59 * Purpose : Function pointers used to access above functions - all calls
60 *	     come through these
61 */
62		.type	arm9tdmi_processor_functions, #object
63ENTRY(arm9tdmi_processor_functions)
64		.word	nommu_early_abort
65		.word	legacy_pabort
66		.word	cpu_arm9tdmi_proc_init
67		.word	cpu_arm9tdmi_proc_fin
68		.word	cpu_arm9tdmi_reset
69		.word	cpu_arm9tdmi_do_idle
70		.word	cpu_arm9tdmi_dcache_clean_area
71		.word	cpu_arm9tdmi_switch_mm
72		.word	0		@ cpu_*_set_pte
73		.size	arm9tdmi_processor_functions, . - arm9tdmi_processor_functions
74
75		.section ".rodata"
76
77		.type	cpu_arch_name, #object
78cpu_arch_name:
79		.asciz	"armv4t"
80		.size	cpu_arch_name, . - cpu_arch_name
81
82		.type	cpu_elf_name, #object
83cpu_elf_name:
84		.asciz	"v4"
85		.size	cpu_elf_name, . - cpu_elf_name
86
87		.type	cpu_arm9tdmi_name, #object
88cpu_arm9tdmi_name:
89		.asciz	"ARM9TDMI"
90		.size	cpu_arm9tdmi_name, . - cpu_arm9tdmi_name
91
92		.type	cpu_p2001_name, #object
93cpu_p2001_name:
94		.asciz	"P2001"
95		.size	cpu_p2001_name, . - cpu_p2001_name
96
97		.align
98
99		.section ".proc.info.init", #alloc, #execinstr
100
101		.type	__arm9tdmi_proc_info, #object
102__arm9tdmi_proc_info:
103		.long	0x41009900
104		.long	0xfff8ff00
105		.long	0
106		.long	0
107		b	__arm9tdmi_setup
108		.long	cpu_arch_name
109		.long	cpu_elf_name
110		.long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
111		.long	cpu_arm9tdmi_name
112		.long	arm9tdmi_processor_functions
113		.long	0
114		.long	0
115		.long	v4_cache_fns
116		.size	__arm9tdmi_proc_info, . - __arm9dmi_proc_info
117
118		.type	__p2001_proc_info, #object
119__p2001_proc_info:
120		.long	0x41029000
121		.long	0xffffffff
122		.long	0
123		.long	0
124		b	__arm9tdmi_setup
125		.long	cpu_arch_name
126		.long	cpu_elf_name
127		.long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
128		.long	cpu_p2001_name
129		.long	arm9tdmi_processor_functions
130		.long	0
131		.long	0
132		.long	v4_cache_fns
133		.size	__p2001_proc_info, . - __p2001_proc_info
134