diff options
author | Eric Miao <eric.miao@marvell.com> | 2008-11-26 02:39:39 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2008-12-02 01:42:40 -0500 |
commit | f1c6cd62cc4f7e55a803c4b9b92a67488d765a8f (patch) | |
tree | 07ce7dbc2060360e56bb5719e06c0ed6b79e0c8e | |
parent | 6f584cfab47173bcbf06b67cb22d519e95317311 (diff) |
[ARM] pxa: introduced cpu_is_pxa935() and cpu_is_pxa9xx()
Signed-off-by: Eric Miao <eric.miao@marvell.com>
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/hardware.h | 31 |
2 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 6c59f989a61a..83e3dc32be91 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -19,6 +19,9 @@ config CPU_PXA320 | |||
19 | config CPU_PXA930 | 19 | config CPU_PXA930 |
20 | bool "PXA930 (codename Tavor-P)" | 20 | bool "PXA930 (codename Tavor-P)" |
21 | 21 | ||
22 | config CPU_PXA935 | ||
23 | bool "PXA935 (codename Tavor-P65)" | ||
24 | |||
22 | endmenu | 25 | endmenu |
23 | 26 | ||
24 | endif | 27 | endif |
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index f6b4103ecc65..e2d6784aa7ef 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -102,6 +102,9 @@ | |||
102 | * PXA930 B0 0x69056835 0x5E643013 | 102 | * PXA930 B0 0x69056835 0x5E643013 |
103 | * PXA930 B1 0x69056837 0x7E643013 | 103 | * PXA930 B1 0x69056837 0x7E643013 |
104 | * PXA930 B2 0x69056838 0x8E643013 | 104 | * PXA930 B2 0x69056838 0x8E643013 |
105 | * | ||
106 | * PXA935 A0 0x56056931 0x1E653013 | ||
107 | * PXA935 B0 0x56056936 0x6E653013 | ||
105 | */ | 108 | */ |
106 | #ifdef CONFIG_PXA25x | 109 | #ifdef CONFIG_PXA25x |
107 | #define __cpu_is_pxa210(id) \ | 110 | #define __cpu_is_pxa210(id) \ |
@@ -178,12 +181,22 @@ | |||
178 | #define __cpu_is_pxa930(id) \ | 181 | #define __cpu_is_pxa930(id) \ |
179 | ({ \ | 182 | ({ \ |
180 | unsigned int _id = (id) >> 4 & 0xfff; \ | 183 | unsigned int _id = (id) >> 4 & 0xfff; \ |
181 | _id == 0x683; \ | 184 | _id == 0x683; \ |
182 | }) | 185 | }) |
183 | #else | 186 | #else |
184 | #define __cpu_is_pxa930(id) (0) | 187 | #define __cpu_is_pxa930(id) (0) |
185 | #endif | 188 | #endif |
186 | 189 | ||
190 | #ifdef CONFIG_CPU_PXA935 | ||
191 | #define __cpu_is_pxa935(id) \ | ||
192 | ({ \ | ||
193 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
194 | _id == 0x693; \ | ||
195 | }) | ||
196 | #else | ||
197 | #define __cpu_is_pxa935(id) (0) | ||
198 | #endif | ||
199 | |||
187 | #define cpu_is_pxa210() \ | 200 | #define cpu_is_pxa210() \ |
188 | ({ \ | 201 | ({ \ |
189 | __cpu_is_pxa210(read_cpuid_id()); \ | 202 | __cpu_is_pxa210(read_cpuid_id()); \ |
@@ -230,6 +243,12 @@ | |||
230 | __cpu_is_pxa930(id); \ | 243 | __cpu_is_pxa930(id); \ |
231 | }) | 244 | }) |
232 | 245 | ||
246 | #define cpu_is_pxa935() \ | ||
247 | ({ \ | ||
248 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
249 | __cpu_is_pxa935(id); \ | ||
250 | }) | ||
251 | |||
233 | /* | 252 | /* |
234 | * CPUID Core Generation Bit | 253 | * CPUID Core Generation Bit |
235 | * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x | 254 | * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x |
@@ -247,6 +266,12 @@ | |||
247 | _id == 0x3; \ | 266 | _id == 0x3; \ |
248 | }) | 267 | }) |
249 | 268 | ||
269 | #define __cpu_is_pxa9xx(id) \ | ||
270 | ({ \ | ||
271 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
272 | _id == 0x683 || _id == 0x693; \ | ||
273 | }) | ||
274 | |||
250 | #define cpu_is_pxa2xx() \ | 275 | #define cpu_is_pxa2xx() \ |
251 | ({ \ | 276 | ({ \ |
252 | __cpu_is_pxa2xx(read_cpuid_id()); \ | 277 | __cpu_is_pxa2xx(read_cpuid_id()); \ |
@@ -257,6 +282,10 @@ | |||
257 | __cpu_is_pxa3xx(read_cpuid_id()); \ | 282 | __cpu_is_pxa3xx(read_cpuid_id()); \ |
258 | }) | 283 | }) |
259 | 284 | ||
285 | #define cpu_is_pxa9xx() \ | ||
286 | ({ \ | ||
287 | __cpu_is_pxa9xx(read_cpuid_id()); \ | ||
288 | }) | ||
260 | /* | 289 | /* |
261 | * return current memory and LCD clock frequency in units of 10kHz | 290 | * return current memory and LCD clock frequency in units of 10kHz |
262 | */ | 291 | */ |