diff options
Diffstat (limited to 'include/asm-arm/arch-pxa/hardware.h')
-rw-r--r-- | include/asm-arm/arch-pxa/hardware.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index e2bdc2fbede1..386121746417 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -62,6 +62,42 @@ | |||
62 | 62 | ||
63 | #ifndef __ASSEMBLY__ | 63 | #ifndef __ASSEMBLY__ |
64 | 64 | ||
65 | #define __cpu_is_pxa21x(id) \ | ||
66 | ({ \ | ||
67 | unsigned int _id = (id) >> 4 & 0xf3f; \ | ||
68 | _id == 0x212; \ | ||
69 | }) | ||
70 | |||
71 | #define __cpu_is_pxa25x(id) \ | ||
72 | ({ \ | ||
73 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
74 | _id == 0x2d0 || _id == 0x290; \ | ||
75 | }) | ||
76 | |||
77 | #define __cpu_is_pxa27x(id) \ | ||
78 | ({ \ | ||
79 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
80 | _id == 0x411; \ | ||
81 | }) | ||
82 | |||
83 | #define cpu_is_pxa21x() \ | ||
84 | ({ \ | ||
85 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
86 | __cpu_is_pxa21x(id); \ | ||
87 | }) | ||
88 | |||
89 | #define cpu_is_pxa25x() \ | ||
90 | ({ \ | ||
91 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
92 | __cpu_is_pxa25x(id); \ | ||
93 | }) | ||
94 | |||
95 | #define cpu_is_pxa27x() \ | ||
96 | ({ \ | ||
97 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
98 | __cpu_is_pxa27x(id); \ | ||
99 | }) | ||
100 | |||
65 | /* | 101 | /* |
66 | * Handy routine to set GPIO alternate functions | 102 | * Handy routine to set GPIO alternate functions |
67 | */ | 103 | */ |