aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/id.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2010-09-16 09:14:46 -0400
committerSantosh Shilimkar <santosh.shilimkar@ti.com>2010-09-24 02:00:17 -0400
commited6be0bafc7781634a197ddd85b575ffcd7736b6 (patch)
tree5061c75b425900b1c891a9a09bd96723c12a53f9 /arch/arm/mach-omap2/id.c
parentf47d8c694e666843653f06c257d8cfb87e376f5d (diff)
omap4: Update id.c and cpu.h for es2.0
This patch updates the id.c and cpu.h files to support omap4 ES2.0 silicon detection. Few initial omap4 es2 samples IDCODE is same as es1. So the patch uses ARM cpuid register to detect the ES version for such samples Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/id.c')
-rw-r--r--arch/arm/mach-omap2/id.c38
1 files changed, 31 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 9a879f959509..91d7df402b35 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -298,7 +298,6 @@ static void __init omap4_check_revision(void)
298 u32 idcode; 298 u32 idcode;
299 u16 hawkeye; 299 u16 hawkeye;
300 u8 rev; 300 u8 rev;
301 char *rev_name = "ES1.0";
302 301
303 /* 302 /*
304 * The IC rev detection is done with hawkeye and rev. 303 * The IC rev detection is done with hawkeye and rev.
@@ -309,14 +308,39 @@ static void __init omap4_check_revision(void)
309 hawkeye = (idcode >> 12) & 0xffff; 308 hawkeye = (idcode >> 12) & 0xffff;
310 rev = (idcode >> 28) & 0xff; 309 rev = (idcode >> 28) & 0xff;
311 310
312 if ((hawkeye == 0xb852) && (rev == 0x0)) { 311 /*
313 omap_revision = OMAP4430_REV_ES1_0; 312 * Few initial ES2.0 samples IDCODE is same as ES1.0
314 omap_chip.oc |= CHIP_IS_OMAP4430ES1; 313 * Use ARM register to detect the correct ES version
315 pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name); 314 */
316 return; 315 if (!rev) {
316 idcode = read_cpuid(CPUID_ID);
317 rev = (idcode & 0xf) - 1;
318 }
319
320 switch (hawkeye) {
321 case 0xb852:
322 switch (rev) {
323 case 0:
324 omap_revision = OMAP4430_REV_ES1_0;
325 omap_chip.oc |= CHIP_IS_OMAP4430ES1;
326 break;
327 case 1:
328 omap_revision = OMAP4430_REV_ES2_0;
329 omap_chip.oc |= CHIP_IS_OMAP4430ES2;
330 break;
331 default:
332 omap_revision = OMAP4430_REV_ES2_0;
333 omap_chip.oc |= CHIP_IS_OMAP4430ES2;
334 }
335 break;
336 default:
337 /* Unknown default to latest silicon rev as default*/
338 omap_revision = OMAP4430_REV_ES2_0;
339 omap_chip.oc |= CHIP_IS_OMAP4430ES2;
317 } 340 }
318 341
319 pr_err("Unknown OMAP4 CPU id\n"); 342 pr_info("OMAP%04x ES%d.0\n",
343 omap_rev() >> 16, ((omap_rev() >> 12) & 0xf) + 1);
320} 344}
321 345
322#define OMAP3_SHOW_FEATURE(feat) \ 346#define OMAP3_SHOW_FEATURE(feat) \