From patchwork Tue Aug 7 20:41:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 1288321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 285B93FCC5 for ; Tue, 7 Aug 2012 20:44:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SyqbF-00051P-O7; Tue, 07 Aug 2012 20:41:57 +0000 Received: from na3sys009aog119.obsmtp.com ([74.125.149.246]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1SyqbB-00051B-21 for linux-arm-kernel@lists.infradead.org; Tue, 07 Aug 2012 20:41:54 +0000 Received: from mail-gh0-f181.google.com ([209.85.160.181]) (using TLSv1) by na3sys009aob119.postini.com ([74.125.148.12]) with SMTP ID DSNKUCF9jhm7eS9FXYArbap6Owg7NtmSsLTL@postini.com; Tue, 07 Aug 2012 13:41:52 PDT Received: by ghz3 with SMTP id 3so59063ghz.12 for ; Tue, 07 Aug 2012 13:41:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=gfBKJx5KmADq13Yhy/MRH1QjeXGR8OMVf1x/MmHAQzA=; b=O5q0/MwpCnIMbIy743gOa9JIbOzni6dhbK/JyuRh0y1PoT5qDDfTttJ8Eh4sk5YgtV 4WMrM1QiIFqk/FhMRY30XtB8mOC4960gsXuTj4AIrgL6qriCsAP1hWPQzPpxkHaTQwsp lurEJbHwJl/zOsh0QpY4B9QL4OvsHYJqlURzSYGTt6I6Vt6yX0YsuZqqic4mQrJZ2lRT I/ugBmvSn4R9Hd9OwAQVz/F1VkmUmOunkF/a1fzggW/UlPTqkRBh+/ZlqCm+OLBbq6SO zP78aRe32W0+uNbg8m3TMx+Koeu4e9uu9PHsgBWgLRQbRLhC2bEnFR1oFrd63TH1NKLD +M+w== Received: by 10.66.80.165 with SMTP id s5mr28573685pax.41.1344372109492; Tue, 07 Aug 2012 13:41:49 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net. [24.19.7.36]) by mx.google.com with ESMTPS id rp9sm3955198pbc.52.2012.08.07.13.41.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Aug 2012 13:41:48 -0700 (PDT) From: Kevin Hilman To: Paul Walmsley , linux-omap@vger.kernel.org Subject: [PATCH] Revert "ARM: OMAP3: PM: call pre/post transition per powerdomain" Date: Tue, 7 Aug 2012 13:41:47 -0700 Message-Id: <1344372107-17786-1-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.9.2 X-Gm-Message-State: ALoCoQmZruPbRFs5PThctlgBYhOGDj3kick0MUMc2TV+2Lh8eMzKfKFmWS6Nfk3itrgyvXxoa5ML X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.246 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Tero Kristo , Rajendra Nayak , Jean Pihet , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This reverts commit 58f0829b7186150318c79515f0e0850c5e7a9c89. Converstion to per-pwrdm per/post transition calls was a bit premature. Only tracking MPU, PER & CORE in the idle path means we lose the accounting for all the other powerdomains which may also transition in idle. On OMAP3, due to autodeps, several powerdomains transition along with MPU (e.g. DSS, USBHOST), and the accounting for these was lost with this patch. This patch should be revisited when the upcoming clkdm/pwrmdm/voltdm use-counting seires is merged since then we can properly do accounting without relying on a call in the idle path. Cc: Jean Pihet Cc: Tero Kristo Cc: Rajendra Nayak Reported-by: Paul Walmsley Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/pm34xx.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index e4fc88c..05bd8f0 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -272,21 +272,16 @@ void omap_sram_idle(void) per_next_state = pwrdm_read_next_pwrst(per_pwrdm); core_next_state = pwrdm_read_next_pwrst(core_pwrdm); - if (mpu_next_state < PWRDM_POWER_ON) { - pwrdm_pre_transition(mpu_pwrdm); - pwrdm_pre_transition(neon_pwrdm); - } + pwrdm_pre_transition(NULL); /* PER */ if (per_next_state < PWRDM_POWER_ON) { - pwrdm_pre_transition(per_pwrdm); per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; omap2_gpio_prepare_for_idle(per_going_off); } /* CORE */ if (core_next_state < PWRDM_POWER_ON) { - pwrdm_pre_transition(core_pwrdm); if (core_next_state == PWRDM_POWER_OFF) { omap3_core_save_context(); omap3_cm_save_context(); @@ -339,20 +334,14 @@ void omap_sram_idle(void) omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK, OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); - pwrdm_post_transition(core_pwrdm); } omap3_intc_resume_idle(); + pwrdm_post_transition(NULL); + /* PER */ - if (per_next_state < PWRDM_POWER_ON) { + if (per_next_state < PWRDM_POWER_ON) omap2_gpio_resume_after_idle(); - pwrdm_post_transition(per_pwrdm); - } - - if (mpu_next_state < PWRDM_POWER_ON) { - pwrdm_post_transition(mpu_pwrdm); - pwrdm_post_transition(neon_pwrdm); - } } static void omap3_pm_idle(void)