From patchwork Wed Nov 25 04:09:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 62676 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 nAP49gTx007073 for ; Wed, 25 Nov 2009 04:09:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934515AbZKYEJf (ORCPT ); Tue, 24 Nov 2009 23:09:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934498AbZKYEJe (ORCPT ); Tue, 24 Nov 2009 23:09:34 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:42823 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934507AbZKYEJ1 (ORCPT ); Tue, 24 Nov 2009 23:09:27 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAP49WYh026317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Nov 2009 22:09:32 -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 nAP49Qfb019846; Tue, 24 Nov 2009 22:09: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 nAP49QZ29797; Tue, 24 Nov 2009 22:09:26 -0600 (CST) Received: by senorita (Postfix, from userid 1000) id DF461C1DA; Tue, 24 Nov 2009 22:09:24 -0600 (CST) From: Nishanth Menon To: linux-omap Cc: Nishanth Menon , Benoit Cousson , Kevin Hilman , Madhusudhan Chikkature Rajashekar , Paul Walmsley , Romit Dasgupta , Sanjeev Premi , Santosh Shilimkar , Sergio Alberto Aguirre Rodriguez , Thara Gopinath , Vishwanath Sripathy Subject: [PATCH 09/10 V3] omap3: pm: introduce 3630 opps Date: Tue, 24 Nov 2009 22:09:18 -0600 Message-Id: <1259122159-1583-10-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1259122159-1583-9-git-send-email-nm@ti.com> References: <1259122159-1583-1-git-send-email-nm@ti.com> <1259122159-1583-2-git-send-email-nm@ti.com> <1259122159-1583-3-git-send-email-nm@ti.com> <1259122159-1583-4-git-send-email-nm@ti.com> <1259122159-1583-5-git-send-email-nm@ti.com> <1259122159-1583-6-git-send-email-nm@ti.com> <1259122159-1583-7-git-send-email-nm@ti.com> <1259122159-1583-8-git-send-email-nm@ti.com> <1259122159-1583-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/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index ad21f5f..05ecf02 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -143,6 +143,41 @@ static struct omap_opp_def __initdata omap34xx_dsp_rate_table[] = { {.enabled = 0, .freq = 0, .u_volt = 0} }; +static struct omap_opp_def __initdata omap36xx_mpu_rate_table[] = { + /*OPP1 - OPP50*/ + {.enabled = true, .freq = 300000000, .u_volt = 930000}, + /*OPP2 - OPP100*/ + {.enabled = true, .freq = 600000000, .u_volt = 1100000}, + /*OPP3 - OPP-Turbo*/ + {.enabled = false, .freq = 800000000, .u_volt = 1260000}, + /*OPP4 - OPP-SB*/ + {.enabled = false, .freq = 1000000000, .u_volt = 1310000}, + /* Terminator */ + {.enabled = 0, .freq = 0, .u_volt = 0} +}; + +static struct omap_opp_def __initdata omap36xx_l3_rate_table[] = { + /*OPP1 - OPP50 */ + {.enabled = true, .freq = 100000000, .u_volt = 930000}, + /*OPP2 - OPP100, OPP-Turbo, OPP-SB*/ + {.enabled = true, .freq = 200000000, .u_volt = 1137500}, + /* Terminator */ + {.enabled = 0, .freq = 0, .u_volt = 0} +}; + +static struct omap_opp_def __initdata omap36xx_dsp_rate_table[] = { + /*OPP1 - OPP50*/ + {.enabled = true, .freq = 260000000, .u_volt = 930000}, + /*OPP2 - OPP100*/ + {.enabled = true, .freq = 520000000, .u_volt = 1100000}, + /*OPP3 - OPP-Turbo*/ + {.enabled = false, .freq = 660000000, .u_volt = 1260000}, + /*OPP4 - OPP-SB*/ + {.enabled = false, .freq = 875000000, .u_volt = 1310000}, + /* Terminator */ + {.enabled = 0, .freq = 0, .u_volt = 0} +}; + struct omap_opp *omap3_mpu_rate_table; struct omap_opp *omap3_dsp_rate_table; struct omap_opp *omap3_l3_rate_table; @@ -1299,18 +1334,28 @@ static void __init configure_vc(void) void __init omap3_pm_init_opp_table(void) { int ret, i; + struct omap_opp_def **omap3_opp_def_list; struct omap_opp_def *omap34xx_opp_def_list[] = { omap34xx_mpu_rate_table, omap34xx_l3_rate_table, omap34xx_dsp_rate_table }; + struct omap_opp_def *omap36xx_opp_def_list[] = { + omap36xx_mpu_rate_table, + omap36xx_l3_rate_table, + omap36xx_dsp_rate_table + }; struct omap_opp **omap3_rate_tables[] = { &omap3_mpu_rate_table, &omap3_l3_rate_table, &omap3_dsp_rate_table }; - for (i = 0; i < ARRAY_SIZE(omap34xx_opp_def_list); i++) { - ret = opp_init(omap3_rate_tables[i], omap34xx_opp_def_list[i]); + + omap3_opp_def_list = cpu_is_omap3630() ? omap36xx_opp_def_list : + omap34xx_opp_def_list; + + for (i = 0; i < ARRAY_SIZE(omap3_rate_tables); i++) { + ret = opp_init(omap3_rate_tables[i], omap3_opp_def_list[i]); /* We dont want half configured system at the moment */ BUG_ON(ret); }