diff options
author | Manjunath G Kondaiah <manjugk@ti.com> | 2011-01-19 14:38:24 +0530 |
---|---|---|
committer | Manjunath G Kondaiah <manjugk@ti.com> | 2011-01-19 14:38:24 +0530 |
commit | 7933330af591f95d532e81e9c85947ddd7018f91 (patch) | |
tree | b3a36a9324d50cbf213f3c6cc632b4da2dde1c72 | |
parent | 17151e9cb8c78e60a29d65874f763c0c1f448d34 (diff) | |
parent | 263297f9a5e52abed05e60a3cd298d01ebd2068d (diff) |
Merge branch 'for-l24x11-p6' of git://dev.omapzoom.org/pub/scm/anand/linux-omap-usb into L24.11
-rw-r--r-- | arch/arm/mach-omap2/id.c | 80 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 17 |
2 files changed, 44 insertions, 53 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 515c7a6327f7..48b87af62bbe 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -6,7 +6,7 @@ * Copyright (C) 2005 Nokia Corporation * Written by Tony Lindgren <tony@atomide.com> * - * Copyright (C) 2009 Texas Instruments + * Copyright (C) 2009-11 Texas Instruments * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> * * This program is free software; you can redistribute it and/or modify @@ -102,6 +102,7 @@ static struct omap_id omap_ids[] __initdata = { static void __iomem *tap_base; static u16 tap_prod_id; + void __init omap24xx_check_revision(void) { int i, j; @@ -270,9 +271,9 @@ void __init omap3_check_revision(void) void __init omap4_check_revision(void) { u32 idcode; - u8 rev; -#if 0 u16 hawkeye; + u8 rev; + /* * The IC rev detection is done with hawkeye and rev. * Note that rev does not map directly to defined processor @@ -280,65 +281,50 @@ void __init omap4_check_revision(void) */ idcode = read_tap_reg(OMAP_TAP_IDCODE); hawkeye = (idcode >> 12) & 0xffff; - rev = (idcode >> 28) & 0xff; + rev = (idcode >> 28) & 0xf; + + /* + * Few initial ES2.0 samples IDCODE is same as ES1.0 + * Use ARM register to detect the correct ES version + */ + if (!rev) { + idcode = read_cpuid(CPUID_ID); + rev = (idcode & 0xf) - 1; + } - /*FIXME: Check ES2 hawkeye and rev fields */ switch (hawkeye) { case 0xb852: - switch(rev) { + switch (rev) { case 0: omap_revision = OMAP4430_REV_ES1_0; omap_chip.oc |= CHIP_IS_OMAP4430ES1; - rev = 1; break; case 1: - omap_revision = OMAP4430_REV_ES2_0; - omap_chip.oc |= CHIP_IS_OMAP4430ES2; - rev = 2; - break; default: omap_revision = OMAP4430_REV_ES2_0; omap_chip.oc |= CHIP_IS_OMAP4430ES2; - rev = 2; - } - break; - default: - /* Unknown default to latest silicon rev as default*/ - omap_revision = OMAP4430_REV_ES2_0; - omap_chip.oc |= CHIP_IS_OMAP4430ES2; - rev = 2; - } -#endif - /* - * FIXME: Temporary ID check hack. - * Use ARM register to check the ES type - */ - idcode = read_cpuid(CPUID_ID); - if (((idcode >> 4) & 0xfff) == 0xc09) { - idcode &= 0xf; - switch (idcode) { - case 1: - omap_revision = OMAP4430_REV_ES1_0; - omap_chip.oc |= CHIP_IS_OMAP4430ES1; - rev = 1; - break; - case 2: - omap_revision = OMAP4430_REV_ES2_0; - omap_chip.oc |= CHIP_IS_OMAP4430ES2; - rev = 2; + } + break; + case 0xb95c: + switch (rev) { + case 3: + omap_revision = OMAP4430_REV_ES2_1; + omap_chip.oc |= CHIP_IS_OMAP4430ES2_1; break; + case 4: default: - omap_revision = OMAP4430_REV_ES2_0; - omap_chip.oc |= CHIP_IS_OMAP4430ES2; - rev = 2; + omap_revision = OMAP4430_REV_ES2_2; + omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; } - } else { - /* Assume the latest version */ - omap_revision = OMAP4430_REV_ES2_0; - omap_chip.oc |= CHIP_IS_OMAP4430ES2; - rev = 2; + break; + default: + /* Unknown default to latest silicon rev as default */ + omap_revision = OMAP4430_REV_ES2_2; + omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; } - pr_info("OMAP%04x ES%d.0\n", omap_rev() >> 16, rev); + + pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16, + ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf)); } #define OMAP3_SHOW_FEATURE(feat) \ diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 9d5542e1fac5..6301de8c06ef 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -5,7 +5,7 @@ * * Copyright (C) 2004, 2008 Nokia Corporation * - * Copyright (C) 2009 Texas Instruments. + * Copyright (C) 2009-11 Texas Instruments. * * Written by Tony Lindgren <tony.lindgren@nokia.com> * @@ -386,8 +386,10 @@ IS_OMAP_TYPE(3517, 0x3517) #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) #define OMAP443X_CLASS 0x44300044 -#define OMAP4430_REV_ES1_0 0x44300044 -#define OMAP4430_REV_ES2_0 0x44301044 +#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) +#define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) +#define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8)) +#define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8)) /* * omap_chip bits @@ -413,12 +415,15 @@ IS_OMAP_TYPE(3517, 0x3517) #define CHIP_IS_OMAP3630ES1 (1 << 7) #define CHIP_IS_OMAP4430ES1 (1 << 8) #define CHIP_IS_OMAP4430ES2 (1 << 9) +#define CHIP_IS_OMAP4430ES2_1 (1 << 10) +#define CHIP_IS_OMAP4430ES2_2 (1 << 11) #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) -#define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ - CHIP_IS_OMAP4430ES2) - +#define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ + CHIP_IS_OMAP4430ES2 | \ + CHIP_IS_OMAP4430ES2_1 | \ + CHIP_IS_OMAP4430ES2_2) /* * "GE" here represents "greater than or equal to" in terms of ES * levels. So CHIP_GE_OMAP3430ES2 is intended to match all OMAP3430 |