Go to the documentation of this file.
13 #ifndef __ASM_ARCH_HARDWARE_H
14 #define __ASM_ARCH_HARDWARE_H
16 #include <mach/addr-map.h>
22 #define UNCACHED_PHYS_0 0xff000000
23 #define UNCACHED_ADDR UNCACHED_PHYS_0
39 #define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1))
40 #define io_p2v(x) IOMEM(0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1))
43 # define __REG(x) (*((volatile u32 __iomem *)io_p2v(x)))
47 # define __REG2(x,y) \
48 (*(volatile u32 __iomem*)((u32)&__REG(x) + (y)))
50 # define __PREG(x) (io_v2p((u32)&(x)))
54 # define __REG(x) io_p2v(x)
55 # define __PREG(x) io_v2p(x)
61 #include <asm/cputype.h>
107 #define __cpu_is_pxa210(id) \
109 unsigned int _id = (id) & 0xf3f0; \
113 #define __cpu_is_pxa250(id) \
115 unsigned int _id = (id) & 0xf3ff; \
119 #define __cpu_is_pxa255(id) \
121 unsigned int _id = (id) & 0xffff; \
125 #define __cpu_is_pxa25x(id) \
127 unsigned int _id = (id) & 0xf300; \
131 #define __cpu_is_pxa210(id) (0)
132 #define __cpu_is_pxa250(id) (0)
133 #define __cpu_is_pxa255(id) (0)
134 #define __cpu_is_pxa25x(id) (0)
138 #define __cpu_is_pxa27x(id) \
140 unsigned int _id = (id) >> 4 & 0xfff; \
144 #define __cpu_is_pxa27x(id) (0)
147 #ifdef CONFIG_CPU_PXA300
148 #define __cpu_is_pxa300(id) \
150 unsigned int _id = (id) >> 4 & 0xfff; \
154 #define __cpu_is_pxa300(id) (0)
157 #ifdef CONFIG_CPU_PXA310
158 #define __cpu_is_pxa310(id) \
160 unsigned int _id = (id) >> 4 & 0xfff; \
164 #define __cpu_is_pxa310(id) (0)
167 #ifdef CONFIG_CPU_PXA320
168 #define __cpu_is_pxa320(id) \
170 unsigned int _id = (id) >> 4 & 0xfff; \
171 _id == 0x603 || _id == 0x682; \
174 #define __cpu_is_pxa320(id) (0)
177 #ifdef CONFIG_CPU_PXA930
178 #define __cpu_is_pxa930(id) \
180 unsigned int _id = (id) >> 4 & 0xfff; \
184 #define __cpu_is_pxa930(id) (0)
187 #ifdef CONFIG_CPU_PXA935
188 #define __cpu_is_pxa935(id) \
190 unsigned int _id = (id) >> 4 & 0xfff; \
194 #define __cpu_is_pxa935(id) (0)
197 #ifdef CONFIG_CPU_PXA955
198 #define __cpu_is_pxa955(id) \
200 unsigned int _id = (id) >> 4 & 0xfff; \
201 _id == 0x581 || _id == 0xc08 \
205 #define __cpu_is_pxa955(id) (0)
208 #define cpu_is_pxa210() \
210 __cpu_is_pxa210(read_cpuid_id()); \
213 #define cpu_is_pxa250() \
215 __cpu_is_pxa250(read_cpuid_id()); \
218 #define cpu_is_pxa255() \
220 __cpu_is_pxa255(read_cpuid_id()); \
223 #define cpu_is_pxa25x() \
225 __cpu_is_pxa25x(read_cpuid_id()); \
228 #define cpu_is_pxa27x() \
230 __cpu_is_pxa27x(read_cpuid_id()); \
233 #define cpu_is_pxa300() \
235 __cpu_is_pxa300(read_cpuid_id()); \
238 #define cpu_is_pxa310() \
240 __cpu_is_pxa310(read_cpuid_id()); \
243 #define cpu_is_pxa320() \
245 __cpu_is_pxa320(read_cpuid_id()); \
248 #define cpu_is_pxa930() \
250 __cpu_is_pxa930(read_cpuid_id()); \
253 #define cpu_is_pxa935() \
255 __cpu_is_pxa935(read_cpuid_id()); \
258 #define cpu_is_pxa955() \
260 __cpu_is_pxa955(read_cpuid_id()); \
268 #if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
269 #define __cpu_is_pxa2xx(id) \
271 unsigned int _id = (id) >> 13 & 0x7; \
275 #define __cpu_is_pxa2xx(id) (0)
279 #define __cpu_is_pxa3xx(id) \
281 __cpu_is_pxa300(id) \
282 || __cpu_is_pxa310(id) \
283 || __cpu_is_pxa320(id) \
284 || __cpu_is_pxa93x(id); \
287 #define __cpu_is_pxa3xx(id) (0)
290 #if defined(CONFIG_CPU_PXA930) || defined(CONFIG_CPU_PXA935)
291 #define __cpu_is_pxa93x(id) \
293 __cpu_is_pxa930(id) \
294 || __cpu_is_pxa935(id); \
297 #define __cpu_is_pxa93x(id) (0)
301 #define __cpu_is_pxa95x(id) \
303 __cpu_is_pxa955(id); \
306 #define __cpu_is_pxa95x(id) (0)
309 #define cpu_is_pxa2xx() \
311 __cpu_is_pxa2xx(read_cpuid_id()); \
314 #define cpu_is_pxa3xx() \
316 __cpu_is_pxa3xx(read_cpuid_id()); \
319 #define cpu_is_pxa93x() \
321 __cpu_is_pxa93x(read_cpuid_id()); \
324 #define cpu_is_pxa95x() \
326 __cpu_is_pxa95x(read_cpuid_id()); \