From: Tony Lindgren Date: Tue, 11 Mar 2008 10:51:34 +0000 (+0200) Subject: ARM: OMAP3: Fix cpu detection for 34xx es2.0 and above X-Git-Tag: v2.6.25-omap1~144 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=235a97a82e16f550090440e412e9457a9312585e;p=linux-2.6-omap-h63xx.git ARM: OMAP3: Fix cpu detection for 34xx es2.0 and above Revisions above ES2.0 should use just hawkeye and rev for version detection. Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index a2109c1b8b1..54668a9b836 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -60,9 +60,6 @@ static struct omap_id omap_ids[] __initdata = { { .hawkeye = 0xb5d9, .dev = 0x4, .type = 0x24220000 }, { .hawkeye = 0xb5d9, .dev = 0x8, .type = 0x24230000 }, { .hawkeye = 0xb68a, .dev = 0x0, .type = 0x24300000 }, - { .hawkeye = 0xb7ae, .dev = 0xf, .type = 0x34300000 }, - { .hawkeye = 0xb7ae, .dev = 0x0, .type = 0x34301000 }, - { .hawkeye = 0xb7ae, .dev = 0xe, .type = 0x34302000 }, }; static u32 __init read_tap_reg(int reg) @@ -89,16 +86,6 @@ static u32 __init read_tap_reg(int reg) case OMAP_TAP_DIE_ID_2: regval = 0x00000000; break; case OMAP_TAP_DIE_ID_3: regval = 0x2d2c0000; break; } - } else if ((((cpuid >> 4) & 0xFFF) == 0xC08) && ((cpuid & 0xF) == 0x1)) { - switch (reg) { - case OMAP_TAP_IDCODE : regval = 0x1b7ae02f; break; - /* Making DevType as 0xE in ES2 to differ from other ESx */ - case OMAP_TAP_PROD_ID : regval = 0x000E00F0; break; - case OMAP_TAP_DIE_ID_0: regval = 0x0400800f; break; - case OMAP_TAP_DIE_ID_1: regval = 0x04013d1d; break; - case OMAP_TAP_DIE_ID_2: regval = 0x00000000; break; - case OMAP_TAP_DIE_ID_3: regval = 0x1fe80001; break; - } } else regval = __raw_readl(TAP_BASE + reg); @@ -138,6 +125,17 @@ void __init omap2_check_revision(void) prod_id, dev_type); #endif + /* + * Detection for 34xx ES2.0 and above can be done with just + * hawkeye and rev. See TRM 1.5.2 Device Identification. + * Note that rev cannot be used directly as ES1.0 uses value 0. + */ + if (hawkeye == 0xb7ae) { + system_rev = 0x34300000 | ((1 + rev) << 12); + pr_info("OMAP%04x ES2.%i\n", system_rev >> 16, rev); + return; + } + /* Check hawkeye ids */ for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { if (hawkeye == omap_ids[i].hawkeye) diff --git a/include/asm-arm/arch-omap/cpu.h b/include/asm-arm/arch-omap/cpu.h index e8a4cf52778..ed86d5e2d4f 100644 --- a/include/asm-arm/arch-omap/cpu.h +++ b/include/asm-arm/arch-omap/cpu.h @@ -345,6 +345,8 @@ IS_OMAP_TYPE(3430, 0x3430) #define OMAP2430_REV_ES1_0 0x24300000 #define OMAP3430_REV_ES1_0 0x34300000 #define OMAP3430_REV_ES2_0 0x34301000 +#define OMAP3430_REV_ES2_1 0x34302000 +#define OMAP3430_REV_ES2_2 0x34303000 /* * Macro to detect device type i.e. EMU/HS/TST/GP/BAD