From patchwork Thu Oct 15 14:48:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 54040 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 n9FEnoEf002568 for ; Thu, 15 Oct 2009 14:49:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762212AbZJOOtf (ORCPT ); Thu, 15 Oct 2009 10:49:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762198AbZJOOtf (ORCPT ); Thu, 15 Oct 2009 10:49:35 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:43863 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762191AbZJOOte (ORCPT ); Thu, 15 Oct 2009 10:49:34 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n9FEmsMe028582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Oct 2009 09:48:56 -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 n9FEmpks010218; Thu, 15 Oct 2009 20:18:52 +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 n9FEmpU4014348; Thu, 15 Oct 2009 20:18:51 +0530 Received: (from x0016154@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id n9FEmocD014346; Thu, 15 Oct 2009 20:18:50 +0530 From: Rajendra Nayak To: linux-omap@vger.kernel.org Cc: khilman@deeprootsystems.com, Rajendra Nayak Subject: [PATCH v2 1/2] OMAP3: PM: Configure PRM setup times from board files Date: Thu, 15 Oct 2009 20:18:49 +0530 Message-Id: <1255618130-14005-1-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.5.5 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/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 14868b5..0f1975c 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -56,6 +56,23 @@ #define TWL4030_MSECURE_GPIO 22 +/* FIXME: These are not the optimal setup values to be used on 3430sdp*/ +static struct prm_setup_vc omap3_setuptime_table = { + .clksetup = 0xff, + .voltsetup_time1 = 0xfff, + .voltsetup_time2 = 0xfff, + .voltoffset = 0xff, + .voltsetup2 = 0xff, + .vdd0_on = 0x30, + .vdd0_onlp = 0x20, + .vdd0_ret = 0x1e, + .vdd0_off = 0x00, + .vdd1_on = 0x2c, + .vdd1_onlp = 0x20, + .vdd1_ret = 0x1e, + .vdd1_off = 0x00, +}; + static int board_keymap[] = { KEY(0, 0, KEY_LEFT), KEY(0, 1, KEY_RIGHT), @@ -185,6 +202,7 @@ static void __init omap_3430sdp_init_irq(void) { omap_board_config = sdp3430_config; omap_board_config_size = ARRAY_SIZE(sdp3430_config); + omap3_pm_init_vc(&omap3_setuptime_table); omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL, omap3_mpu_rate_table, omap3_dsp_rate_table, omap3_l3_rate_table); omap_init_irq(); diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index f8d11a2..ca673c5 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -41,7 +41,7 @@ struct prm_setup_vc { u16 vdd1_ret; u16 vdd1_off; }; -extern void omap3_set_prm_setup_vc(struct prm_setup_vc *setup_vc); +extern void omap3_pm_init_vc(struct prm_setup_vc *setup_vc); extern int resource_set_opp_level(int res, u32 target_level, int flags); extern int resource_access_opp_lock(int res, int delta); diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 01260ec..3d7ae2f 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -1027,8 +1027,11 @@ int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state) return -EINVAL; } -void omap3_set_prm_setup_vc(struct prm_setup_vc *setup_vc) +void omap3_pm_init_vc(struct prm_setup_vc *setup_vc) { + if (!setup_vc) + return; + prm_setup.clksetup = setup_vc->clksetup; prm_setup.voltsetup_time1 = setup_vc->voltsetup_time1; prm_setup.voltsetup_time2 = setup_vc->voltsetup_time2;