aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjeev Premi <premi@ti.com>2010-10-01 19:35:24 -0400
committerTony Lindgren <tony@atomide.com>2010-10-01 19:35:24 -0400
commit76abab213587bfc3b850f36c0a674116d161148d (patch)
tree14e04a504539e4da776579d2a878f50df0cd03a7
parent5a3b2f7a5a79082dd3a5f2294cbd85fc3b173d98 (diff)
omap2/3: Update revision identification
The existing definitions for cpu revision used upper nibble in the bits[15:08]. With OMAP3630, definitions use lower nibble. This patch unifies the definitions to start at lower nibble. Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/id.c72
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h36
2 files changed, 66 insertions, 42 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 0412233da2b..04a2fa240bc 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -385,30 +385,54 @@ static void __init omap3_cpuinfo(void)
385 strcpy(cpu_name, "OMAP3503"); 385 strcpy(cpu_name, "OMAP3503");
386 } 386 }
387 387
388 switch (rev) { 388 if (cpu_is_omap3630()) {
389 case OMAP_REVBITS_00: 389 switch (rev) {
390 strcpy(cpu_rev, "1.0"); 390 case OMAP_REVBITS_00:
391 break; 391 strcpy(cpu_rev, "1.0");
392 case OMAP_REVBITS_01: 392 break;
393 strcpy(cpu_rev, "1.1"); 393 case OMAP_REVBITS_01:
394 break; 394 strcpy(cpu_rev, "1.1");
395 case OMAP_REVBITS_02: 395 break;
396 strcpy(cpu_rev, "1.2"); 396 case OMAP_REVBITS_02:
397 break; 397 /* FALLTHROUGH */
398 case OMAP_REVBITS_10: 398 default:
399 strcpy(cpu_rev, "2.0"); 399 /* Use the latest known revision as default */
400 break; 400 strcpy(cpu_rev, "1.2");
401 case OMAP_REVBITS_20: 401 }
402 strcpy(cpu_rev, "2.1"); 402 } else if (cpu_is_omap3505() || cpu_is_omap3517()) {
403 break; 403 switch (rev) {
404 case OMAP_REVBITS_30: 404 case OMAP_REVBITS_00:
405 strcpy(cpu_rev, "3.0"); 405 strcpy(cpu_rev, "1.0");
406 break; 406 break;
407 case OMAP_REVBITS_40: 407 case OMAP_REVBITS_01:
408 /* FALLTHROUGH */ 408 /* FALLTHROUGH */
409 default: 409 default:
410 /* Use the latest known revision as default */ 410 /* Use the latest known revision as default */
411 strcpy(cpu_rev, "3.1"); 411 strcpy(cpu_rev, "1.1");
412 }
413 } else {
414 switch (rev) {
415 case OMAP_REVBITS_00:
416 strcpy(cpu_rev, "1.0");
417 break;
418 case OMAP_REVBITS_01:
419 strcpy(cpu_rev, "2.0");
420 break;
421 case OMAP_REVBITS_02:
422 strcpy(cpu_rev, "2.1");
423 break;
424 case OMAP_REVBITS_03:
425 strcpy(cpu_rev, "3.0");
426 break;
427 case OMAP_REVBITS_04:
428 strcpy(cpu_rev, "3.1");
429 break;
430 case OMAP_REVBITS_05:
431 /* FALLTHROUGH */
432 default:
433 /* Use the latest known revision as default */
434 strcpy(cpu_rev, "3.1.2");
435 }
412 } 436 }
413 437
414 /* Print verbose information */ 438 /* Print verbose information */
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 9b38e4bddf5..3fd8b405572 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -68,10 +68,9 @@ unsigned int omap_rev(void);
68#define OMAP_REVBITS_00 0x00 68#define OMAP_REVBITS_00 0x00
69#define OMAP_REVBITS_01 0x01 69#define OMAP_REVBITS_01 0x01
70#define OMAP_REVBITS_02 0x02 70#define OMAP_REVBITS_02 0x02
71#define OMAP_REVBITS_10 0x10 71#define OMAP_REVBITS_03 0x03
72#define OMAP_REVBITS_20 0x20 72#define OMAP_REVBITS_04 0x04
73#define OMAP_REVBITS_30 0x30 73#define OMAP_REVBITS_05 0x05
74#define OMAP_REVBITS_40 0x40
75 74
76/* 75/*
77 * Get the CPU revision for OMAP devices 76 * Get the CPU revision for OMAP devices
@@ -363,23 +362,24 @@ IS_OMAP_TYPE(3517, 0x3517)
363 362
364/* Various silicon revisions for omap2 */ 363/* Various silicon revisions for omap2 */
365#define OMAP242X_CLASS 0x24200024 364#define OMAP242X_CLASS 0x24200024
366#define OMAP2420_REV_ES1_0 0x24200024 365#define OMAP2420_REV_ES1_0 OMAP242X_CLASS
367#define OMAP2420_REV_ES2_0 0x24201024 366#define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (OMAP_REVBITS_01 << 8))
368 367
369#define OMAP243X_CLASS 0x24300024 368#define OMAP243X_CLASS 0x24300024
370#define OMAP2430_REV_ES1_0 0x24300024 369#define OMAP2430_REV_ES1_0 OMAP243X_CLASS
371 370
372#define OMAP343X_CLASS 0x34300034 371#define OMAP343X_CLASS 0x34300034
373#define OMAP3430_REV_ES1_0 0x34300034 372#define OMAP3430_REV_ES1_0 OMAP343X_CLASS
374#define OMAP3430_REV_ES2_0 0x34301034 373#define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (OMAP_REVBITS_01 << 8))
375#define OMAP3430_REV_ES2_1 0x34302034 374#define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (OMAP_REVBITS_02 << 8))
376#define OMAP3430_REV_ES3_0 0x34303034 375#define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (OMAP_REVBITS_03 << 8))
377#define OMAP3430_REV_ES3_1 0x34304034 376#define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (OMAP_REVBITS_04 << 8))
378#define OMAP3430_REV_ES3_1_2 0x34305034 377#define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (OMAP_REVBITS_05 << 8))
379 378
380#define OMAP3630_REV_ES1_0 0x36300034 379#define OMAP363X_CLASS 0x36300034
381#define OMAP3630_REV_ES1_1 0x36300134 380#define OMAP3630_REV_ES1_0 OMAP363X_CLASS
382#define OMAP3630_REV_ES1_2 0x36300234 381#define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8))
382#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8))
383 383
384#define OMAP35XX_CLASS 0x35000034 384#define OMAP35XX_CLASS 0x35000034
385#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) 385#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
@@ -390,7 +390,7 @@ IS_OMAP_TYPE(3517, 0x3517)
390#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) 390#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8))
391 391
392#define OMAP443X_CLASS 0x44300044 392#define OMAP443X_CLASS 0x44300044
393#define OMAP4430_REV_ES1_0 0x44300044 393#define OMAP4430_REV_ES1_0 OMAP443X_CLASS
394#define OMAP4430_REV_ES2_0 0x44301044 394#define OMAP4430_REV_ES2_0 0x44301044
395 395
396/* 396/*