]> err.no Git - linux-2.6/blobdiff - include/asm-arm/arch-pxa/hardware.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / include / asm-arm / arch-pxa / hardware.h
index e2bdc2fbede1efdd52e1a393601edb3c2f5f4e91..386121746417093c90d6807bda3cc90d3d2c7e91 100644 (file)
 
 #ifndef __ASSEMBLY__
 
+#define __cpu_is_pxa21x(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 4 & 0xf3f;   \
+               _id == 0x212;                           \
+       })
+
+#define __cpu_is_pxa25x(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 4 & 0xfff;   \
+               _id == 0x2d0 || _id == 0x290;           \
+       })
+
+#define __cpu_is_pxa27x(id)                            \
+       ({                                              \
+               unsigned int _id = (id) >> 4 & 0xfff;   \
+               _id == 0x411;                           \
+       })
+
+#define cpu_is_pxa21x()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa21x(id);                    \
+       })
+
+#define cpu_is_pxa25x()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa25x(id);                    \
+       })
+
+#define cpu_is_pxa27x()                                        \
+       ({                                              \
+               unsigned int id = read_cpuid(CPUID_ID); \
+               __cpu_is_pxa27x(id);                    \
+       })
+
 /*
  * Handy routine to set GPIO alternate functions
  */