From patchwork Sat Oct 10 00:46:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 52896 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9A0nlTB025230 for ; Sat, 10 Oct 2009 00:49:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932939AbZJJArd (ORCPT ); Fri, 9 Oct 2009 20:47:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932936AbZJJArd (ORCPT ); Fri, 9 Oct 2009 20:47:33 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:47772 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754043AbZJJArc (ORCPT ); Fri, 9 Oct 2009 20:47:32 -0400 Received: from dlep35.itg.ti.com ([157.170.170.118]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n9A0knHX032250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Oct 2009 19:46:49 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id n9A0kgoq003023; Fri, 9 Oct 2009 19:46:42 -0500 (CDT) Received: from senorita (senorita.am.dhcp.ti.com [128.247.75.1]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id n9A0kgZ17735; Fri, 9 Oct 2009 19:46:42 -0500 (CDT) Received: by senorita (Postfix, from userid 1000) id 79B5EC13A; Fri, 9 Oct 2009 19:46:42 -0500 (CDT) From: Nishanth Menon To: linux-omap Cc: Nishanth Menon , Madhusudhan Chikkature Rajashekar , Vikram Pandita , Allen Pais , Anand Gadiyar , Benoit Cousson , Felipe Balbi , Kevin Hilman , Sanjeev Premi , Santosh Shilimkar , Sergio Alberto Aguirre Rodriguez , Tony Lindgren Subject: [PATCH v5] OMAP3: introduce OMAP3630 Date: Fri, 9 Oct 2009 19:46:42 -0500 Message-Id: <1255135602-31673-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <[PATCHv2 1/1] Runtime detection of OMAP35x devices> References: <[PATCHv2 1/1] Runtime detection of OMAP35x devices> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index d4d563b..71d5568 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -209,7 +209,9 @@ void __init omap3_check_revision(void) hawkeye = (idcode >> 12) & 0xffff; rev = (idcode >> 28) & 0xff; - if (hawkeye == 0xb7ae) { + switch (hawkeye) { + case 0xb7ae: + /* Handle 34xx/35xx devices */ switch (rev) { case 0: /* Take care of early samples */ case 1: @@ -228,6 +230,21 @@ void __init omap3_check_revision(void) /* Use the latest known revision as default */ omap_revision = OMAP3430_REV_ES3_1; } + break; + case 0xb891: + /* Handle 36xx devices */ + switch (rev) { + case 0: + omap_revision = OMAP3630_REV_ES1_0; + break; + default: + /* Use the latest known revision as default */ + omap_revision = OMAP3630_REV_ES1_0; + } + break; + default: + /* Unknown default to latest silicon rev as default*/ + omap_revision = OMAP3630_REV_ES1_0; } } @@ -249,9 +266,10 @@ void __init omap3_cpuinfo(void) * on available features. Upon detection, update the CPU id * and CPU class bits. */ - if (omap3_has_iva() && omap3_has_sgx()) { + if (cpu_is_omap3630()) + strcpy(cpu_name, "3630"); + else if (omap3_has_iva() && omap3_has_sgx()) strcpy(cpu_name, "3430/3530"); - } else if (omap3_has_sgx()) { omap_revision = OMAP3525_REV(rev); strcpy(cpu_name, "3525"); diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h index 8d0841b..da9e8f8 100644 --- a/arch/arm/plat-omap/include/mach/cpu.h +++ b/arch/arm/plat-omap/include/mach/cpu.h @@ -180,6 +180,7 @@ IS_OMAP_CLASS(34xx, 0x34) IS_OMAP_SUBCLASS(242x, 0x242) IS_OMAP_SUBCLASS(243x, 0x243) IS_OMAP_SUBCLASS(343x, 0x343) +IS_OMAP_SUBCLASS(363x, 0x363) #define cpu_is_omap7xx() 0 #define cpu_is_omap15xx() 0 @@ -385,6 +386,7 @@ IS_OMAP_TYPE(3430, 0x3430) (omap3_has_sgx()) & \ (!omap3_has_iva())) # define cpu_is_omap3530 (cpu_is_omap3430()) +# define cpu_is_omap3630() is_omap363x() #endif # if defined(CONFIG_ARCH_OMAP4) @@ -415,6 +417,8 @@ IS_OMAP_TYPE(3430, 0x3430) #define OMAP3430_REV_ES3_0 0x34303034 #define OMAP3430_REV_ES3_1 0x34304034 +#define OMAP3630_REV_ES1_0 0x36300034 + #define OMAP35XX_CLASS 0x35000034 #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 12)) #define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 12))