From patchwork Tue Aug 3 19:59:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Gadiyar X-Patchwork-Id: 116853 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o73Jxc1T001081 for ; Tue, 3 Aug 2010 19:59:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757616Ab0HCT7e (ORCPT ); Tue, 3 Aug 2010 15:59:34 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:40444 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756207Ab0HCT7e (ORCPT ); Tue, 3 Aug 2010 15:59:34 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o73JxUD7025012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 3 Aug 2010 14:59:32 -0500 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o73JxPHr018560; Wed, 4 Aug 2010 01:29:25 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id o73JxPEL006627; Wed, 4 Aug 2010 01:29:25 +0530 Received: (from a0393673@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o73JxOWC006625; Wed, 4 Aug 2010 01:29:24 +0530 From: Anand Gadiyar To: linux-omap@vger.kernel.org Cc: Anand Gadiyar , Nishanth Menon , Manjunatha GK , Tony Lindgren Subject: [PATCH v2] OMAP3630: Add ES1.1 and ES1.2 detection Date: Wed, 4 Aug 2010 01:29:24 +0530 Message-Id: <1280865564-6456-1-git-send-email-gadiyar@ti.com> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <20100803073940.GS12293@atomide.com> References: <20100803073940.GS12293@atomide.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 03 Aug 2010 19:59:38 +0000 (UTC) Index: linux-2.6/arch/arm/mach-omap2/id.c =================================================================== --- linux-2.6.orig/arch/arm/mach-omap2/id.c +++ linux-2.6/arch/arm/mach-omap2/id.c @@ -261,9 +261,26 @@ void __init omap3_check_revision(void) case 0xb891: /* FALLTHROUGH */ default: - /* Unknown default to latest silicon rev as default*/ - omap_revision = OMAP3630_REV_ES1_0; + /* Unknown hawkeye defaults to latest silicon revision */ + + /* Handle 36xx devices */ omap_chip.oc |= CHIP_IS_OMAP3630ES1; + + switch(rev) { + case 0: /* Take care of early samples */ + omap_revision = OMAP3630_REV_ES1_0; + break; + case 1: + omap_revision = OMAP3630_REV_ES1_1; + omap_chip.oc |= CHIP_IS_OMAP3630ES1_1; + break; + case 2: + /* Fall through */ + default: + /* Use the latest known revision as default */ + omap_revision = OMAP3630_REV_ES1_2; + omap_chip.oc |= CHIP_IS_OMAP3630ES1_2; + } } } @@ -339,6 +356,12 @@ void __init omap3_cpuinfo(void) case OMAP_REVBITS_00: strcpy(cpu_rev, "1.0"); break; + case OMAP_REVBITS_01: + strcpy(cpu_rev, "1.1"); + break; + case OMAP_REVBITS_02: + strcpy(cpu_rev, "1.2"); + break; case OMAP_REVBITS_10: strcpy(cpu_rev, "2.0"); break; Index: linux-2.6/arch/arm/plat-omap/include/plat/cpu.h =================================================================== --- linux-2.6.orig/arch/arm/plat-omap/include/plat/cpu.h +++ linux-2.6/arch/arm/plat-omap/include/plat/cpu.h @@ -66,6 +66,8 @@ unsigned int omap_rev(void); * family. This difference can be handled separately. */ #define OMAP_REVBITS_00 0x00 +#define OMAP_REVBITS_01 0x01 +#define OMAP_REVBITS_02 0x02 #define OMAP_REVBITS_10 0x10 #define OMAP_REVBITS_20 0x20 #define OMAP_REVBITS_30 0x30 @@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517) #define OMAP3430_REV_ES3_1_2 0x34305034 #define OMAP3630_REV_ES1_0 0x36300034 +#define OMAP3630_REV_ES1_1 0x36300134 +#define OMAP3630_REV_ES1_2 0x36300234 #define OMAP35XX_CLASS 0x35000034 #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) @@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517) #define CHIP_IS_OMAP3430ES3_1 (1 << 6) #define CHIP_IS_OMAP3630ES1 (1 << 7) #define CHIP_IS_OMAP4430ES1 (1 << 8) +#define CHIP_IS_OMAP3630ES1_1 (1 << 9) +#define CHIP_IS_OMAP3630ES1_2 (1 << 10) #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) @@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517) */ #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \ CHIP_IS_OMAP3430ES3_0 | \ - CHIP_IS_OMAP3430ES3_1 | \ - CHIP_IS_OMAP3630ES1) + CHIP_GE_OMAP3430ES3_1) #define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \ - CHIP_IS_OMAP3630ES1) - + CHIP_IS_OMAP3630ES1 | \ + CHIP_GE_OMAP3630ES1_1) +#define CHIP_GE_OMAP3630ES1_1 (CHIP_IS_OMAP3630ES1_1 | \ + CHIP_IS_OMAP3630ES1_2) int omap_chip_is(struct omap_chip_id oci); void omap2_check_revision(void);