diff options
author | Eric Miao <eric.miao@marvell.com> | 2008-09-10 22:27:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-25 04:54:55 -0400 |
commit | 0ffcbfd54ea81ca24c0749f55ca4fcf3e2bdc23e (patch) | |
tree | 46890e5788964978c5ab0ea915decf8dbd772929 /arch/arm | |
parent | 2b12797c59d60379858050255046dacfbee68a8b (diff) |
[ARM] pxa: make cpu_is_pxa2* macros more consistent
1. add a CPUID table in the comment
2. make cpu_is_pxa25x() true for PXA210/250/255/26x
3. PXA210 is treated as PXA25x, all related code modified to
reflect this
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/hardware.h | 77 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/time.c | 2 |
4 files changed, 68 insertions, 17 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index ceaed0076366..cbbf30097920 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -46,7 +46,7 @@ void clear_reset_status(unsigned int mask) | |||
46 | */ | 46 | */ |
47 | unsigned int get_clk_frequency_khz(int info) | 47 | unsigned int get_clk_frequency_khz(int info) |
48 | { | 48 | { |
49 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 49 | if (cpu_is_pxa25x()) |
50 | return pxa25x_get_clk_frequency_khz(info); | 50 | return pxa25x_get_clk_frequency_khz(info); |
51 | else if (cpu_is_pxa27x()) | 51 | else if (cpu_is_pxa27x()) |
52 | return pxa27x_get_clk_frequency_khz(info); | 52 | return pxa27x_get_clk_frequency_khz(info); |
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(get_clk_frequency_khz); | |||
60 | */ | 60 | */ |
61 | unsigned int get_memclk_frequency_10khz(void) | 61 | unsigned int get_memclk_frequency_10khz(void) |
62 | { | 62 | { |
63 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 63 | if (cpu_is_pxa25x()) |
64 | return pxa25x_get_memclk_frequency_10khz(); | 64 | return pxa25x_get_memclk_frequency_10khz(); |
65 | else if (cpu_is_pxa27x()) | 65 | else if (cpu_is_pxa27x()) |
66 | return pxa27x_get_memclk_frequency_10khz(); | 66 | return pxa27x_get_memclk_frequency_10khz(); |
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index e89df4d0d239..c9ee4081d533 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -62,26 +62,72 @@ | |||
62 | 62 | ||
63 | #ifndef __ASSEMBLY__ | 63 | #ifndef __ASSEMBLY__ |
64 | 64 | ||
65 | /* | ||
66 | * CPU Stepping CPU_ID JTAG_ID | ||
67 | * | ||
68 | * PXA210 B0 0x69052922 0x2926C013 | ||
69 | * PXA210 B1 0x69052923 0x3926C013 | ||
70 | * PXA210 B2 0x69052924 0x4926C013 | ||
71 | * PXA210 C0 0x69052D25 0x5926C013 | ||
72 | * | ||
73 | * PXA250 A0 0x69052100 0x09264013 | ||
74 | * PXA250 A1 0x69052101 0x19264013 | ||
75 | * PXA250 B0 0x69052902 0x29264013 | ||
76 | * PXA250 B1 0x69052903 0x39264013 | ||
77 | * PXA250 B2 0x69052904 0x49264013 | ||
78 | * PXA250 C0 0x69052D05 0x59264013 | ||
79 | * | ||
80 | * PXA255 A0 0x69052D06 0x69264013 | ||
81 | * | ||
82 | * PXA26x A0 0x69052903 0x39264013 | ||
83 | * PXA26x B0 0x69052D05 0x59264013 | ||
84 | * | ||
85 | * PXA27x A0 0x69054110 0x09265013 | ||
86 | * PXA27x A1 0x69054111 0x19265013 | ||
87 | * PXA27x B0 0x69054112 0x29265013 | ||
88 | * PXA27x B1 0x69054113 0x39265013 | ||
89 | * PXA27x C0 0x69054114 0x49265013 | ||
90 | * PXA27x C5 0x69054117 0x79265013 | ||
91 | * | ||
92 | * PXA30x A0 0x69056880 0x0E648013 | ||
93 | * PXA30x A1 0x69056881 0x1E648013 | ||
94 | * PXA31x A0 0x69056890 0x0E649013 | ||
95 | * PXA31x A1 0x69056891 0x1E649013 | ||
96 | * PXA31x A2 0x69056892 0x2E649013 | ||
97 | * PXA32x B1 0x69056825 0x5E642013 | ||
98 | * PXA32x B2 0x69056826 0x6E642013 | ||
99 | * | ||
100 | * PXA930 B0 0x69056835 0x5E643013 | ||
101 | * PXA930 B1 0x69056837 0x7E643013 | ||
102 | * PXA930 B2 0x69056838 0x8E643013 | ||
103 | */ | ||
65 | #ifdef CONFIG_PXA25x | 104 | #ifdef CONFIG_PXA25x |
66 | #define __cpu_is_pxa21x(id) \ | 105 | #define __cpu_is_pxa210(id) \ |
67 | ({ \ | 106 | ({ \ |
68 | unsigned int _id = (id) >> 4 & 0xf3f; \ | 107 | unsigned int _id = (id) & 0xf3f0; \ |
69 | _id == 0x212; \ | 108 | _id == 0x2120; \ |
70 | }) | 109 | }) |
71 | 110 | ||
72 | #define __cpu_is_pxa255(id) \ | 111 | #define __cpu_is_pxa250(id) \ |
73 | ({ \ | 112 | ({ \ |
74 | unsigned int _id = (id) >> 4 & 0xfff; \ | 113 | unsigned int _id = (id) & 0xf3ff; \ |
75 | _id == 0x2d0; \ | 114 | _id <= 0x2105; \ |
76 | }) | 115 | }) |
116 | |||
117 | #define __cpu_is_pxa255(id) \ | ||
118 | ({ \ | ||
119 | unsigned int _id = (id) & 0xffff; \ | ||
120 | _id == 0x2d06; \ | ||
121 | }) | ||
77 | 122 | ||
78 | #define __cpu_is_pxa25x(id) \ | 123 | #define __cpu_is_pxa25x(id) \ |
79 | ({ \ | 124 | ({ \ |
80 | unsigned int _id = (id) >> 4 & 0xfff; \ | 125 | unsigned int _id = (id) & 0xf300; \ |
81 | _id == 0x2d0 || _id == 0x290; \ | 126 | _id == 0x2100; \ |
82 | }) | 127 | }) |
83 | #else | 128 | #else |
84 | #define __cpu_is_pxa21x(id) (0) | 129 | #define __cpu_is_pxa210(id) (0) |
130 | #define __cpu_is_pxa250(id) (0) | ||
85 | #define __cpu_is_pxa255(id) (0) | 131 | #define __cpu_is_pxa255(id) (0) |
86 | #define __cpu_is_pxa25x(id) (0) | 132 | #define __cpu_is_pxa25x(id) (0) |
87 | #endif | 133 | #endif |
@@ -136,9 +182,14 @@ | |||
136 | #define __cpu_is_pxa930(id) (0) | 182 | #define __cpu_is_pxa930(id) (0) |
137 | #endif | 183 | #endif |
138 | 184 | ||
139 | #define cpu_is_pxa21x() \ | 185 | #define cpu_is_pxa210() \ |
186 | ({ \ | ||
187 | __cpu_is_pxa210(read_cpuid_id()); \ | ||
188 | }) | ||
189 | |||
190 | #define cpu_is_pxa250() \ | ||
140 | ({ \ | 191 | ({ \ |
141 | __cpu_is_pxa21x(read_cpuid_id()); \ | 192 | __cpu_is_pxa250(read_cpuid_id()); \ |
142 | }) | 193 | }) |
143 | 194 | ||
144 | #define cpu_is_pxa255() \ | 195 | #define cpu_is_pxa255() \ |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 1be490d6936d..a3a6aff5f0d4 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -348,7 +348,7 @@ static int __init pxa25x_init(void) | |||
348 | { | 348 | { |
349 | int i, ret = 0; | 349 | int i, ret = 0; |
350 | 350 | ||
351 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) { | 351 | if (cpu_is_pxa25x()) { |
352 | 352 | ||
353 | reset_status = RCSR; | 353 | reset_status = RCSR; |
354 | 354 | ||
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 67e18509d7bf..18d149745837 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -155,7 +155,7 @@ static void __init pxa_timer_init(void) | |||
155 | OIER = 0; | 155 | OIER = 0; |
156 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; | 156 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; |
157 | 157 | ||
158 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 158 | if (cpu_is_pxa25x()) |
159 | clock_tick_rate = 3686400; | 159 | clock_tick_rate = 3686400; |
160 | else if (machine_is_mainstone()) | 160 | else if (machine_is_mainstone()) |
161 | clock_tick_rate = 3249600; | 161 | clock_tick_rate = 3249600; |