xref: /openbmc/linux/arch/arm/include/asm/glue-proc.h (revision 60772e48)
1 /*
2  *  arch/arm/include/asm/glue-proc.h
3  *
4  *  Copyright (C) 1997-1999 Russell King
5  *  Copyright (C) 2000 Deep Blue Solutions Ltd
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  */
11 #ifndef ASM_GLUE_PROC_H
12 #define ASM_GLUE_PROC_H
13 
14 #include <asm/glue.h>
15 
16 /*
17  * Work out if we need multiple CPU support
18  */
19 #undef MULTI_CPU
20 #undef CPU_NAME
21 
22 /*
23  * CPU_NAME - the prefix for CPU related functions
24  */
25 
26 #ifdef CONFIG_CPU_ARM7TDMI
27 # ifdef CPU_NAME
28 #  undef  MULTI_CPU
29 #  define MULTI_CPU
30 # else
31 #  define CPU_NAME cpu_arm7tdmi
32 # endif
33 #endif
34 
35 #ifdef CONFIG_CPU_ARM720T
36 # ifdef CPU_NAME
37 #  undef  MULTI_CPU
38 #  define MULTI_CPU
39 # else
40 #  define CPU_NAME cpu_arm720
41 # endif
42 #endif
43 
44 #ifdef CONFIG_CPU_ARM740T
45 # ifdef CPU_NAME
46 #  undef  MULTI_CPU
47 #  define MULTI_CPU
48 # else
49 #  define CPU_NAME cpu_arm740
50 # endif
51 #endif
52 
53 #ifdef CONFIG_CPU_ARM9TDMI
54 # ifdef CPU_NAME
55 #  undef  MULTI_CPU
56 #  define MULTI_CPU
57 # else
58 #  define CPU_NAME cpu_arm9tdmi
59 # endif
60 #endif
61 
62 #ifdef CONFIG_CPU_ARM920T
63 # ifdef CPU_NAME
64 #  undef  MULTI_CPU
65 #  define MULTI_CPU
66 # else
67 #  define CPU_NAME cpu_arm920
68 # endif
69 #endif
70 
71 #ifdef CONFIG_CPU_ARM922T
72 # ifdef CPU_NAME
73 #  undef  MULTI_CPU
74 #  define MULTI_CPU
75 # else
76 #  define CPU_NAME cpu_arm922
77 # endif
78 #endif
79 
80 #ifdef CONFIG_CPU_FA526
81 # ifdef CPU_NAME
82 #  undef  MULTI_CPU
83 #  define MULTI_CPU
84 # else
85 #  define CPU_NAME cpu_fa526
86 # endif
87 #endif
88 
89 #ifdef CONFIG_CPU_ARM925T
90 # ifdef CPU_NAME
91 #  undef  MULTI_CPU
92 #  define MULTI_CPU
93 # else
94 #  define CPU_NAME cpu_arm925
95 # endif
96 #endif
97 
98 #ifdef CONFIG_CPU_ARM926T
99 # ifdef CPU_NAME
100 #  undef  MULTI_CPU
101 #  define MULTI_CPU
102 # else
103 #  define CPU_NAME cpu_arm926
104 # endif
105 #endif
106 
107 #ifdef CONFIG_CPU_ARM940T
108 # ifdef CPU_NAME
109 #  undef  MULTI_CPU
110 #  define MULTI_CPU
111 # else
112 #  define CPU_NAME cpu_arm940
113 # endif
114 #endif
115 
116 #ifdef CONFIG_CPU_ARM946E
117 # ifdef CPU_NAME
118 #  undef  MULTI_CPU
119 #  define MULTI_CPU
120 # else
121 #  define CPU_NAME cpu_arm946
122 # endif
123 #endif
124 
125 #ifdef CONFIG_CPU_SA110
126 # ifdef CPU_NAME
127 #  undef  MULTI_CPU
128 #  define MULTI_CPU
129 # else
130 #  define CPU_NAME cpu_sa110
131 # endif
132 #endif
133 
134 #ifdef CONFIG_CPU_SA1100
135 # ifdef CPU_NAME
136 #  undef  MULTI_CPU
137 #  define MULTI_CPU
138 # else
139 #  define CPU_NAME cpu_sa1100
140 # endif
141 #endif
142 
143 #ifdef CONFIG_CPU_ARM1020
144 # ifdef CPU_NAME
145 #  undef  MULTI_CPU
146 #  define MULTI_CPU
147 # else
148 #  define CPU_NAME cpu_arm1020
149 # endif
150 #endif
151 
152 #ifdef CONFIG_CPU_ARM1020E
153 # ifdef CPU_NAME
154 #  undef  MULTI_CPU
155 #  define MULTI_CPU
156 # else
157 #  define CPU_NAME cpu_arm1020e
158 # endif
159 #endif
160 
161 #ifdef CONFIG_CPU_ARM1022
162 # ifdef CPU_NAME
163 #  undef  MULTI_CPU
164 #  define MULTI_CPU
165 # else
166 #  define CPU_NAME cpu_arm1022
167 # endif
168 #endif
169 
170 #ifdef CONFIG_CPU_ARM1026
171 # ifdef CPU_NAME
172 #  undef  MULTI_CPU
173 #  define MULTI_CPU
174 # else
175 #  define CPU_NAME cpu_arm1026
176 # endif
177 #endif
178 
179 #ifdef CONFIG_CPU_XSCALE
180 # ifdef CPU_NAME
181 #  undef  MULTI_CPU
182 #  define MULTI_CPU
183 # else
184 #  define CPU_NAME cpu_xscale
185 # endif
186 #endif
187 
188 #ifdef CONFIG_CPU_XSC3
189 # ifdef CPU_NAME
190 #  undef  MULTI_CPU
191 #  define MULTI_CPU
192 # else
193 #  define CPU_NAME cpu_xsc3
194 # endif
195 #endif
196 
197 #ifdef CONFIG_CPU_MOHAWK
198 # ifdef CPU_NAME
199 #  undef  MULTI_CPU
200 #  define MULTI_CPU
201 # else
202 #  define CPU_NAME cpu_mohawk
203 # endif
204 #endif
205 
206 #ifdef CONFIG_CPU_FEROCEON
207 # ifdef CPU_NAME
208 #  undef  MULTI_CPU
209 #  define MULTI_CPU
210 # else
211 #  define CPU_NAME cpu_feroceon
212 # endif
213 #endif
214 
215 #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
216 # ifdef CPU_NAME
217 #  undef  MULTI_CPU
218 #  define MULTI_CPU
219 # else
220 #  define CPU_NAME cpu_v6
221 # endif
222 #endif
223 
224 #ifdef CONFIG_CPU_V7M
225 # ifdef CPU_NAME
226 #  undef  MULTI_CPU
227 #  define MULTI_CPU
228 # else
229 #  define CPU_NAME cpu_v7m
230 # endif
231 #endif
232 
233 #ifdef CONFIG_CPU_PJ4B
234 # ifdef CPU_NAME
235 #  undef  MULTI_CPU
236 #  define MULTI_CPU
237 # else
238 #  define CPU_NAME cpu_pj4b
239 # endif
240 #endif
241 
242 #ifdef CONFIG_CPU_V7
243 /*
244  * Cortex-A9 needs a different suspend/resume function, so we need
245  * multiple CPU support for ARMv7 anyway.
246  */
247 #  undef  MULTI_CPU
248 #  define MULTI_CPU
249 #endif
250 
251 #ifndef MULTI_CPU
252 #define cpu_proc_init			__glue(CPU_NAME,_proc_init)
253 #define cpu_proc_fin			__glue(CPU_NAME,_proc_fin)
254 #define cpu_reset			__glue(CPU_NAME,_reset)
255 #define cpu_do_idle			__glue(CPU_NAME,_do_idle)
256 #define cpu_dcache_clean_area		__glue(CPU_NAME,_dcache_clean_area)
257 #define cpu_do_switch_mm		__glue(CPU_NAME,_switch_mm)
258 #define cpu_set_pte_ext			__glue(CPU_NAME,_set_pte_ext)
259 #define cpu_suspend_size		__glue(CPU_NAME,_suspend_size)
260 #define cpu_do_suspend			__glue(CPU_NAME,_do_suspend)
261 #define cpu_do_resume			__glue(CPU_NAME,_do_resume)
262 #endif
263 
264 #endif
265