aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-pxa/hardware.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/arch-pxa/hardware.h')
-rw-r--r--include/asm-arm/arch-pxa/hardware.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h
index 538a34e39e92..fc20d72d4844 100644
--- a/include/asm-arm/arch-pxa/hardware.h
+++ b/include/asm-arm/arch-pxa/hardware.h
@@ -80,6 +80,24 @@
80 _id == 0x411; \ 80 _id == 0x411; \
81 }) 81 })
82 82
83#define __cpu_is_pxa300(id) \
84 ({ \
85 unsigned int _id = (id) >> 4 & 0xfff; \
86 _id == 0x688; \
87 })
88
89#define __cpu_is_pxa310(id) \
90 ({ \
91 unsigned int _id = (id) >> 4 & 0xfff; \
92 _id == 0x689; \
93 })
94
95#define __cpu_is_pxa320(id) \
96 ({ \
97 unsigned int _id = (id) >> 4 & 0xfff; \
98 _id == 0x603 || _id == 0x682; \
99 })
100
83#define cpu_is_pxa21x() \ 101#define cpu_is_pxa21x() \
84 ({ \ 102 ({ \
85 unsigned int id = read_cpuid(CPUID_ID); \ 103 unsigned int id = read_cpuid(CPUID_ID); \
@@ -98,6 +116,53 @@
98 __cpu_is_pxa27x(id); \ 116 __cpu_is_pxa27x(id); \
99 }) 117 })
100 118
119#define cpu_is_pxa300() \
120 ({ \
121 unsigned int id = read_cpuid(CPUID_ID); \
122 __cpu_is_pxa300(id); \
123 })
124
125#define cpu_is_pxa310() \
126 ({ \
127 unsigned int id = read_cpuid(CPUID_ID); \
128 __cpu_is_pxa310(id); \
129 })
130
131#define cpu_is_pxa320() \
132 ({ \
133 unsigned int id = read_cpuid(CPUID_ID); \
134 __cpu_is_pxa320(id); \
135 })
136
137/*
138 * CPUID Core Generation Bit
139 * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
140 * == 0x3 for pxa300/pxa310/pxa320
141 */
142#define __cpu_is_pxa2xx(id) \
143 ({ \
144 unsigned int _id = (id) >> 13 & 0x7; \
145 _id <= 0x2; \
146 })
147
148#define __cpu_is_pxa3xx(id) \
149 ({ \
150 unsigned int _id = (id) >> 13 & 0x7; \
151 _id == 0x3; \
152 })
153
154#define cpu_is_pxa2xx() \
155 ({ \
156 unsigned int id = read_cpuid(CPUID_ID); \
157 __cpu_is_pxa2xx(id); \
158 })
159
160#define cpu_is_pxa3xx() \
161 ({ \
162 unsigned int id = read_cpuid(CPUID_ID); \
163 __cpu_is_pxa3xx(id); \
164 })
165
101/* 166/*
102 * Handy routine to set GPIO alternate functions 167 * Handy routine to set GPIO alternate functions
103 */ 168 */