From patchwork Fri Oct 23 16:59:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 55596 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 n9NGxjSD026416 for ; Fri, 23 Oct 2009 16:59:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752731AbZJWQ7j (ORCPT ); Fri, 23 Oct 2009 12:59:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752737AbZJWQ7j (ORCPT ); Fri, 23 Oct 2009 12:59:39 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:33893 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbZJWQ7j (ORCPT ); Fri, 23 Oct 2009 12:59:39 -0400 Received: by mail-qy0-f174.google.com with SMTP id 4so6802363qyk.33 for ; Fri, 23 Oct 2009 09:59:43 -0700 (PDT) Received: by 10.224.32.7 with SMTP id a7mr4877524qad.308.1256317183866; Fri, 23 Oct 2009 09:59:43 -0700 (PDT) Received: from localhost ([216.254.16.51]) by mx.google.com with ESMTPS id 7sm8544418qwf.56.2009.10.23.09.59.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Oct 2009 09:59:43 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, "Peter 'p2' De Schrijver" Subject: [PATCH 09/10] OMAP3: PM: idle: Remove fclk check for idle loop Date: Fri, 23 Oct 2009 09:59:07 -0700 Message-Id: <1256317148-25506-10-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.4.3 In-Reply-To: <1256317148-25506-9-git-send-email-khilman@deeprootsystems.com> References: <1256317148-25506-1-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-2-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-3-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-4-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-5-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-6-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-7-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-8-git-send-email-khilman@deeprootsystems.com> <1256317148-25506-9-git-send-email-khilman@deeprootsystems.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 35c917e..40cbba4 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -461,54 +461,12 @@ void omap_sram_idle(void) omap2_clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); } -/* - * Check if functional clocks are enabled before entering - * sleep. This function could be behind CONFIG_PM_DEBUG - * when all drivers are configuring their sysconfig registers - * properly and using their clocks properly. - */ -static int omap3_fclks_active(void) -{ - u32 fck_core1 = 0, fck_core3 = 0, fck_sgx = 0, fck_dss = 0, - fck_cam = 0, fck_per = 0, fck_usbhost = 0; - - fck_core1 = cm_read_mod_reg(CORE_MOD, - CM_FCLKEN1); - if (omap_rev() > OMAP3430_REV_ES1_0) { - fck_core3 = cm_read_mod_reg(CORE_MOD, - OMAP3430ES2_CM_FCLKEN3); - fck_sgx = cm_read_mod_reg(OMAP3430ES2_SGX_MOD, - CM_FCLKEN); - fck_usbhost = cm_read_mod_reg(OMAP3430ES2_USBHOST_MOD, - CM_FCLKEN); - } else - fck_sgx = cm_read_mod_reg(GFX_MOD, - OMAP3430ES2_CM_FCLKEN3); - fck_dss = cm_read_mod_reg(OMAP3430_DSS_MOD, - CM_FCLKEN); - fck_cam = cm_read_mod_reg(OMAP3430_CAM_MOD, - CM_FCLKEN); - fck_per = cm_read_mod_reg(OMAP3430_PER_MOD, - CM_FCLKEN); - - /* Ignore UART clocks. These are handled by UART core (serial.c) */ - fck_core1 &= ~(OMAP3430_EN_UART1 | OMAP3430_EN_UART2); - fck_per &= ~OMAP3430_EN_UART3; - - if (fck_core1 | fck_core3 | fck_sgx | fck_dss | - fck_cam | fck_per | fck_usbhost) - return 1; - return 0; -} - int omap3_can_sleep(void) { if (!sleep_while_idle) return 0; if (!omap_uart_can_sleep()) return 0; - if (omap3_fclks_active()) - return 0; return 1; }