From patchwork Tue Jun 16 11:52:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 30598 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 n5GBr6uS008005 for ; Tue, 16 Jun 2009 11:53:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756034AbZFPLwp (ORCPT ); Tue, 16 Jun 2009 07:52:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756195AbZFPLwp (ORCPT ); Tue, 16 Jun 2009 07:52:45 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:58212 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756034AbZFPLwm (ORCPT ); Tue, 16 Jun 2009 07:52:42 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id n5GBqdlj019668 for ; Tue, 16 Jun 2009 06:52:45 -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 n5GBqZur028510; Tue, 16 Jun 2009 17:22:35 +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 n5GBqZ65002239; Tue, 16 Jun 2009 17:22:35 +0530 Received: (from x0016154@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id n5GBqZ41002237; Tue, 16 Jun 2009 17:22:35 +0530 From: Rajendra Nayak To: linux-omap@vger.kernel.org Cc: dderrick@ti.com, r-woodruff2@ti.com, Rajendra Nayak Subject: [PATCH 02/04] OMAP3: PM: Prevent AUTO_RET and AUTO_OFF being enabled simultaneously Date: Tue, 16 Jun 2009 17:22:32 +0530 Message-Id: <1245153154-1876-2-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.5.5 In-Reply-To: <1245153154-1876-1-git-send-email-rnayak@ti.com> References: <1245153154-1876-1-git-send-email-rnayak@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org There is a design requirement in OMAP3 that Auto_RET and AUTO_OFF should not be set together. The PRCM FSM has been coded assuming that SW will set either auto_ret or auto_off bit depending on whether the core has been programmed to go into open switched logic retention state or OFF state. They are mutually exclusive. A similar issue will exist if SW sets auto_ret= auto_off=1 and auto_sleep = 1 in the PRM voltage CTRL register Signed-off-by: Rajendra Nayak --- arch/arm/mach-omap2/pm34xx.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index a9ef670..d4225b4 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -392,6 +392,10 @@ void omap_sram_idle(void) OMAP3_PRM_VOLTCTRL_OFFSET); omap3_core_save_context(); omap3_prcm_save_context(); + } else if (core_next_state == PWRDM_POWER_RET) { + prm_set_mod_reg_bits(OMAP3430_AUTO_RET, + OMAP3430_GR_MOD, + OMAP3_PRM_VOLTCTRL_OFFSET); } /* Enable IO-PAD and IO-CHAIN wakeups */ prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); @@ -446,6 +450,10 @@ void omap_sram_idle(void) prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF, OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); + else if (core_next_state == PWRDM_POWER_RET) + prm_clear_mod_reg_bits(OMAP3430_AUTO_RET, + OMAP3430_GR_MOD, + OMAP3_PRM_VOLTCTRL_OFFSET); /* Enable smartreflex after WFI */ enable_smartreflex(SR1); enable_smartreflex(SR2); @@ -1128,10 +1136,6 @@ static void __init configure_vc(void) OMAP3430_GR_MOD, OMAP3_PRM_VC_I2C_CFG_OFFSET); - /* Setup value for voltctrl */ - prm_write_mod_reg(OMAP3430_AUTO_RET, - OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); - /* Write setup times */ prm_write_mod_reg(prm_setup.clksetup, OMAP3430_GR_MOD, OMAP3_PRM_CLKSETUP_OFFSET);