aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2006-01-12 11:28:16 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-12 11:28:16 -0500
commit6b090a25fe58067e4bf4515d5056df1f07b64849 (patch)
treede48a1d78c55f5ec119d6c8d2a31b72748a3bf60 /arch
parent37134cd55d57e95d3f606c6f2a57fa496bdad333 (diff)
[ARM] 3234/1: Update cpu_architecture() to deal with the new ID format
Patch from Catalin Marinas Since ARM1176, the CPU ID format has changed and it will also be used for future ARM architectures. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/setup.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 2cab741ad0f8..c45d10d07bde 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -205,7 +205,7 @@ static const char *proc_arch[] = {
205 "5TE", 205 "5TE",
206 "5TEJ", 206 "5TEJ",
207 "6TEJ", 207 "6TEJ",
208 "?(10)", 208 "7",
209 "?(11)", 209 "?(11)",
210 "?(12)", 210 "?(12)",
211 "?(13)", 211 "?(13)",
@@ -258,14 +258,17 @@ int cpu_architecture(void)
258{ 258{
259 int cpu_arch; 259 int cpu_arch;
260 260
261 if ((processor_id & 0x0000f000) == 0) { 261 if ((processor_id & 0x0008f000) == 0) {
262 cpu_arch = CPU_ARCH_UNKNOWN; 262 cpu_arch = CPU_ARCH_UNKNOWN;
263 } else if ((processor_id & 0x0000f000) == 0x00007000) { 263 } else if ((processor_id & 0x0008f000) == 0x00007000) {
264 cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3; 264 cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
265 } else { 265 } else if ((processor_id & 0x00080000) == 0x00000000) {
266 cpu_arch = (processor_id >> 16) & 7; 266 cpu_arch = (processor_id >> 16) & 7;
267 if (cpu_arch) 267 if (cpu_arch)
268 cpu_arch += CPU_ARCH_ARMv3; 268 cpu_arch += CPU_ARCH_ARMv3;
269 } else {
270 /* the revised CPUID */
271 cpu_arch = ((processor_id >> 12) & 0xf) - 0xb + CPU_ARCH_ARMv6;
269 } 272 }
270 273
271 return cpu_arch; 274 return cpu_arch;
@@ -863,11 +866,11 @@ static int c_show(struct seq_file *m, void *v)
863 seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24); 866 seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24);
864 seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]); 867 seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]);
865 868
866 if ((processor_id & 0x0000f000) == 0x00000000) { 869 if ((processor_id & 0x0008f000) == 0x00000000) {
867 /* pre-ARM7 */ 870 /* pre-ARM7 */
868 seq_printf(m, "CPU part\t\t: %07x\n", processor_id >> 4); 871 seq_printf(m, "CPU part\t\t: %07x\n", processor_id >> 4);
869 } else { 872 } else {
870 if ((processor_id & 0x0000f000) == 0x00007000) { 873 if ((processor_id & 0x0008f000) == 0x00007000) {
871 /* ARM7 */ 874 /* ARM7 */
872 seq_printf(m, "CPU variant\t: 0x%02x\n", 875 seq_printf(m, "CPU variant\t: 0x%02x\n",
873 (processor_id >> 16) & 127); 876 (processor_id >> 16) & 127);