From patchwork Fri Nov 13 06:05:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 59723 X-Patchwork-Delegate: khilman@deeprootsystems.com 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 nAD65dnb000581 for ; Fri, 13 Nov 2009 06:05:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753053AbZKMGFc (ORCPT ); Fri, 13 Nov 2009 01:05:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753424AbZKMGFc (ORCPT ); Fri, 13 Nov 2009 01:05:32 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:34865 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753199AbZKMGFW (ORCPT ); Fri, 13 Nov 2009 01:05:22 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAD65Q69018734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Nov 2009 00:05:26 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id nAD65QCj021998; Fri, 13 Nov 2009 00:05:26 -0600 (CST) 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 nAD65PZ12813; Fri, 13 Nov 2009 00:05:25 -0600 (CST) Received: by senorita (Postfix, from userid 1000) id 53B22C1E0; Fri, 13 Nov 2009 00:05:24 -0600 (CST) From: Nishanth Menon To: linux-omap Cc: Nishanth Menon , Benoit Cousson , Jon Hunter , Kevin Hilman , Madhusudhan Chikkature Rajashekar , Paul Walmsley , Romit Dasgupta , Sanjeev Premi , Santosh Shilimkar , Sergio Alberto Aguirre Rodriguez , SuiLun Lam , Thara Gopinath , Vishwanath Sripathy Subject: [PATCH 9/9 v2] omap3: pm: introduce 3630 opps Date: Fri, 13 Nov 2009 00:05:22 -0600 Message-Id: <1258092322-30833-10-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1258092322-30833-9-git-send-email-nm@ti.com> References: <1258092322-30833-1-git-send-email-nm@ti.com> <1258092322-30833-2-git-send-email-nm@ti.com> <1258092322-30833-3-git-send-email-nm@ti.com> <1258092322-30833-4-git-send-email-nm@ti.com> <1258092322-30833-5-git-send-email-nm@ti.com> <1258092322-30833-6-git-send-email-nm@ti.com> <1258092322-30833-7-git-send-email-nm@ti.com> <1258092322-30833-8-git-send-email-nm@ti.com> <1258092322-30833-9-git-send-email-nm@ti.com> 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/omap3-opp.h b/arch/arm/mach-omap2/omap3-opp.h index 7f27f44..a5880b8 100644 --- a/arch/arm/mach-omap2/omap3-opp.h +++ b/arch/arm/mach-omap2/omap3-opp.h @@ -4,22 +4,31 @@ #include /* MPU speeds */ +#define S1000M 1000000000 +#define S800M 800000000 #define S600M 600000000 #define S550M 550000000 #define S500M 500000000 +#define S300M 300000000 #define S250M 250000000 #define S125M 125000000 /* DSP speeds */ +#define S875M 875000000 +#define S660M 660000000 +#define S520M 520000000 #define S430M 430000000 #define S400M 400000000 #define S360M 360000000 +#define S260M 260000000 #define S180M 180000000 #define S90M 90000000 /* L3 speeds */ #define S83M 83000000 +#define S100M 100000000 #define S166M 166000000 +#define S200M 200000000 extern struct omap_opp *omap3_mpu_rate_table; extern struct omap_opp *omap3_dsp_rate_table; diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 14131f8..86137bb 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -141,6 +141,41 @@ static __initdata struct omap_opp omap34xx_dsp_rate_table[] = { {0, 0, 0, 0}, }; +static __initdata struct omap_opp omap36xx_mpu_rate_table[] = { + {0, 0, 0, 0}, + /*OPP1 - 930mV - OPP50*/ + {true, S300M, VDD1_OPP1, 0x1a}, + /*OPP2 - 1.100V - OPP100*/ + {true, S600M, VDD1_OPP2, 0x28}, + /*OPP3 - 1.260V - OPP-Turbo*/ + {false, S800M, VDD1_OPP3, 0x34}, + /*OPP4 - 1.310V - OPP-SB*/ + {false, S1000M, VDD1_OPP4, 0x38}, + {0, 0, 0, 0}, +}; + +static __initdata struct omap_opp omap36xx_l3_rate_table[] = { + {0, 0, 0, 0}, + /*OPP1 - 930mV - OPP50 */ + {true, S100M, VDD2_OPP1, 0x1a}, + /*OPP2 - 1.375V - OPP100, OPP-Turbo, OPP-SB*/ + {true, S200M, VDD2_OPP2, 0x2b}, + {0, 0, 0, 0}, +}; + +static __initdata struct omap_opp omap36xx_dsp_rate_table[] = { + {0, 0, 0, 0}, + /*OPP1 - OPP50*/ + {true, S260M, VDD1_OPP1, 0x1a}, + /*OPP2 - OPP100*/ + {true, S520M, VDD1_OPP2, 0x28}, + /*OPP3 - OPP-Turbo*/ + {false, S660M, VDD1_OPP3, 0x34}, + /*OPP4 - OPP-SB*/ + {false, S875M, VDD1_OPP4, 0x38}, + {0, 0, 0, 0}, +}; + struct omap_opp *omap3_mpu_rate_table; struct omap_opp *omap3_dsp_rate_table; struct omap_opp *omap3_l3_rate_table; @@ -1287,22 +1322,42 @@ static void __init configure_vc(void) void __init omap3_pm_init_opp_table(void) { /* Populate the base CPU rate tables here */ - omap3_mpu_rate_table = kmalloc(sizeof(omap34xx_mpu_rate_table), - GFP_KERNEL); - omap3_dsp_rate_table = kmalloc(sizeof(omap34xx_dsp_rate_table), - GFP_KERNEL); - omap3_l3_rate_table = kmalloc(sizeof(omap34xx_l3_rate_table), - GFP_KERNEL); - - BUG_ON(!omap3_mpu_rate_table || !omap3_dsp_rate_table || - !omap3_l3_rate_table); - - memcpy(omap3_mpu_rate_table, omap34xx_mpu_rate_table, - sizeof(omap34xx_mpu_rate_table)); - memcpy(omap3_dsp_rate_table, omap34xx_dsp_rate_table, - sizeof(omap34xx_dsp_rate_table)); - memcpy(omap3_l3_rate_table, omap34xx_l3_rate_table, - sizeof(omap34xx_l3_rate_table)); + if (cpu_is_omap3630()) { + omap3_mpu_rate_table = kmalloc(sizeof(omap36xx_mpu_rate_table), + GFP_KERNEL); + omap3_dsp_rate_table = kmalloc(sizeof(omap36xx_dsp_rate_table), + GFP_KERNEL); + omap3_l3_rate_table = kmalloc(sizeof(omap36xx_l3_rate_table), + GFP_KERNEL); + + BUG_ON(!omap3_mpu_rate_table || !omap3_dsp_rate_table || + !omap3_l3_rate_table); + + memcpy(omap3_mpu_rate_table, omap36xx_mpu_rate_table, + sizeof(omap36xx_mpu_rate_table)); + memcpy(omap3_dsp_rate_table, omap36xx_dsp_rate_table, + sizeof(omap36xx_dsp_rate_table)); + memcpy(omap3_l3_rate_table, omap36xx_l3_rate_table, + sizeof(omap36xx_l3_rate_table)); + } else { + /* Default to 34xx devices */ + omap3_mpu_rate_table = kmalloc(sizeof(omap34xx_mpu_rate_table), + GFP_KERNEL); + omap3_dsp_rate_table = kmalloc(sizeof(omap34xx_dsp_rate_table), + GFP_KERNEL); + omap3_l3_rate_table = kmalloc(sizeof(omap34xx_l3_rate_table), + GFP_KERNEL); + + BUG_ON(!omap3_mpu_rate_table || !omap3_dsp_rate_table || + !omap3_l3_rate_table); + + memcpy(omap3_mpu_rate_table, omap34xx_mpu_rate_table, + sizeof(omap34xx_mpu_rate_table)); + memcpy(omap3_dsp_rate_table, omap34xx_dsp_rate_table, + sizeof(omap34xx_dsp_rate_table)); + memcpy(omap3_l3_rate_table, omap34xx_l3_rate_table, + sizeof(omap34xx_l3_rate_table)); + } } static int __init omap3_pm_early_init(void)