From patchwork Mon May 3 21:26:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Chan X-Patchwork-Id: 96566 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o43LRSBl013115 for ; Mon, 3 May 2010 21:27:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757726Ab0ECV10 (ORCPT ); Mon, 3 May 2010 17:27:26 -0400 Received: from smtp-out.google.com ([74.125.121.35]:58913 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757559Ab0ECV1Z (ORCPT ); Mon, 3 May 2010 17:27:25 -0400 Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id o43LR14D009075; Mon, 3 May 2010 14:27:01 -0700 Received: from mikechan.mtv.corp.google.com (mikechan.mtv.corp.google.com [172.18.102.252]) by kpbe13.cbf.corp.google.com with ESMTP id o43LQxVL024161; Mon, 3 May 2010 14:26:59 -0700 Received: by mikechan.mtv.corp.google.com (Postfix, from userid 18922) id E60AD22020; Mon, 3 May 2010 14:26:58 -0700 (PDT) From: Mike Chan Cc: khilman@deeprootsystems.com, linux-omap@vger.kernel.org, r-woodruff2@ti.com, tony@atomide.com, Mike Chan Subject: [PATCH 1/2] omap: pm34xx: Enable IO / IO-CHAIN wakeups for PER Date: Mon, 3 May 2010 14:26:57 -0700 Message-Id: <1272922018-11388-1-git-send-email-mike@android.com> X-Mailer: git-send-email 1.7.0.1 X-System-Of-Record: true To: unlisted-recipients:; (no To-header on input) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 03 May 2010 21:27:32 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index ea0000b..2b2eaaa 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -371,6 +371,13 @@ void omap_sram_idle(void) if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON) pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state); + /* Enable IO-PAD and IO-CHAIN wakeups */ + if (per_next_state < PWRDM_POWER_ON || + core_next_state < PWRDM_POWER_ON) { + prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); + omap3_enable_io_chain(); + } + /* PER */ per_next_state = pwrdm_read_next_pwrst(per_pwrdm); core_next_state = pwrdm_read_next_pwrst(core_pwrdm); @@ -398,10 +405,8 @@ void omap_sram_idle(void) omap3_core_save_context(); omap3_prcm_save_context(); } - /* Enable IO-PAD and IO-CHAIN wakeups */ - prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); - omap3_enable_io_chain(); } + omap3_intc_prepare_idle(); /* @@ -463,7 +468,8 @@ void omap_sram_idle(void) } /* Disable IO-PAD and IO-CHAIN wakeup */ - if (core_next_state < PWRDM_POWER_ON) { + if (per_next_state < PWRDM_POWER_ON || + core_next_state < PWRDM_POWER_ON) { prm_clear_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_disable_io_chain(); }