Commit 76abab21 authored by Sanjeev Premi's avatar Sanjeev Premi Committed by Tony Lindgren

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: default avatarSanjeev Premi <premi@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 5a3b2f7a
...@@ -385,30 +385,54 @@ static void __init omap3_cpuinfo(void) ...@@ -385,30 +385,54 @@ static void __init omap3_cpuinfo(void)
strcpy(cpu_name, "OMAP3503"); strcpy(cpu_name, "OMAP3503");
} }
switch (rev) { if (cpu_is_omap3630()) {
case OMAP_REVBITS_00: switch (rev) {
strcpy(cpu_rev, "1.0"); case OMAP_REVBITS_00:
break; strcpy(cpu_rev, "1.0");
case OMAP_REVBITS_01: break;
strcpy(cpu_rev, "1.1"); case OMAP_REVBITS_01:
break; strcpy(cpu_rev, "1.1");
case OMAP_REVBITS_02: break;
strcpy(cpu_rev, "1.2"); case OMAP_REVBITS_02:
break; /* FALLTHROUGH */
case OMAP_REVBITS_10: default:
strcpy(cpu_rev, "2.0"); /* Use the latest known revision as default */
break; strcpy(cpu_rev, "1.2");
case OMAP_REVBITS_20: }
strcpy(cpu_rev, "2.1"); } else if (cpu_is_omap3505() || cpu_is_omap3517()) {
break; switch (rev) {
case OMAP_REVBITS_30: case OMAP_REVBITS_00:
strcpy(cpu_rev, "3.0"); strcpy(cpu_rev, "1.0");
break; break;
case OMAP_REVBITS_40: case OMAP_REVBITS_01:
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
/* Use the latest known revision as default */ /* Use the latest known revision as default */
strcpy(cpu_rev, "3.1"); strcpy(cpu_rev, "1.1");
}
} else {
switch (rev) {
case OMAP_REVBITS_00:
strcpy(cpu_rev, "1.0");
break;
case OMAP_REVBITS_01:
strcpy(cpu_rev, "2.0");
break;
case OMAP_REVBITS_02:
strcpy(cpu_rev, "2.1");
break;
case OMAP_REVBITS_03:
strcpy(cpu_rev, "3.0");
break;
case OMAP_REVBITS_04:
strcpy(cpu_rev, "3.1");
break;
case OMAP_REVBITS_05:
/* FALLTHROUGH */
default:
/* Use the latest known revision as default */
strcpy(cpu_rev, "3.1.2");
}
} }
/* Print verbose information */ /* Print verbose information */
......
...@@ -68,10 +68,9 @@ unsigned int omap_rev(void); ...@@ -68,10 +68,9 @@ unsigned int omap_rev(void);
#define OMAP_REVBITS_00 0x00 #define OMAP_REVBITS_00 0x00
#define OMAP_REVBITS_01 0x01 #define OMAP_REVBITS_01 0x01
#define OMAP_REVBITS_02 0x02 #define OMAP_REVBITS_02 0x02
#define OMAP_REVBITS_10 0x10 #define OMAP_REVBITS_03 0x03
#define OMAP_REVBITS_20 0x20 #define OMAP_REVBITS_04 0x04
#define OMAP_REVBITS_30 0x30 #define OMAP_REVBITS_05 0x05
#define OMAP_REVBITS_40 0x40
/* /*
* Get the CPU revision for OMAP devices * Get the CPU revision for OMAP devices
...@@ -363,23 +362,24 @@ IS_OMAP_TYPE(3517, 0x3517) ...@@ -363,23 +362,24 @@ IS_OMAP_TYPE(3517, 0x3517)
/* Various silicon revisions for omap2 */ /* Various silicon revisions for omap2 */
#define OMAP242X_CLASS 0x24200024 #define OMAP242X_CLASS 0x24200024
#define OMAP2420_REV_ES1_0 0x24200024 #define OMAP2420_REV_ES1_0 OMAP242X_CLASS
#define OMAP2420_REV_ES2_0 0x24201024 #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (OMAP_REVBITS_01 << 8))
#define OMAP243X_CLASS 0x24300024 #define OMAP243X_CLASS 0x24300024
#define OMAP2430_REV_ES1_0 0x24300024 #define OMAP2430_REV_ES1_0 OMAP243X_CLASS
#define OMAP343X_CLASS 0x34300034 #define OMAP343X_CLASS 0x34300034
#define OMAP3430_REV_ES1_0 0x34300034 #define OMAP3430_REV_ES1_0 OMAP343X_CLASS
#define OMAP3430_REV_ES2_0 0x34301034 #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (OMAP_REVBITS_01 << 8))
#define OMAP3430_REV_ES2_1 0x34302034 #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (OMAP_REVBITS_02 << 8))
#define OMAP3430_REV_ES3_0 0x34303034 #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (OMAP_REVBITS_03 << 8))
#define OMAP3430_REV_ES3_1 0x34304034 #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (OMAP_REVBITS_04 << 8))
#define OMAP3430_REV_ES3_1_2 0x34305034 #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (OMAP_REVBITS_05 << 8))
#define OMAP3630_REV_ES1_0 0x36300034 #define OMAP363X_CLASS 0x36300034
#define OMAP3630_REV_ES1_1 0x36300134 #define OMAP3630_REV_ES1_0 OMAP363X_CLASS
#define OMAP3630_REV_ES1_2 0x36300234 #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8))
#define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8))
#define OMAP35XX_CLASS 0x35000034 #define OMAP35XX_CLASS 0x35000034
#define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
...@@ -390,7 +390,7 @@ IS_OMAP_TYPE(3517, 0x3517) ...@@ -390,7 +390,7 @@ IS_OMAP_TYPE(3517, 0x3517)
#define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8))
#define OMAP443X_CLASS 0x44300044 #define OMAP443X_CLASS 0x44300044
#define OMAP4430_REV_ES1_0 0x44300044 #define OMAP4430_REV_ES1_0 OMAP443X_CLASS
#define OMAP4430_REV_ES2_0 0x44301044 #define OMAP4430_REV_ES2_0 0x44301044
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment