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