* [PATCH] Remove fclk check for cpuidle
@ 2009-03-10 16:05 Peter 'p2' De Schrijver
2009-03-13 22:07 ` Kevin Hilman
0 siblings, 1 reply; 2+ messages in thread
From: Peter 'p2' De Schrijver @ 2009-03-10 16:05 UTC (permalink / raw)
To: linux-omap; +Cc: Peter 'p2' De Schrijver
This patch removes the check to see if some functional clocks are still
enabled before entering sleep.
Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
---
arch/arm/mach-omap2/pm34xx.c | 46 ------------------------------------------
1 files changed, 0 insertions(+), 46 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index e12ff2a..008a4d2 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -453,58 +453,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;
-
- /* Ignore GPIO clocks. Handled by GPIO prepare-idle hooks */
- fck_per &= ~(OMAP3430_EN_GPIO2 | OMAP3430_EN_GPIO3 |
- OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 | OMAP3430_EN_GPIO6);
-
- 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 (!enable_dyn_sleep)
return 0;
if (!omap_uart_can_sleep())
return 0;
- if (omap3_fclks_active())
- return 0;
if (atomic_read(&sleep_block) > 0)
return 0;
return 1;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove fclk check for cpuidle
2009-03-10 16:05 [PATCH] Remove fclk check for cpuidle Peter 'p2' De Schrijver
@ 2009-03-13 22:07 ` Kevin Hilman
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Hilman @ 2009-03-13 22:07 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: linux-omap
"Peter 'p2' De Schrijver" <peter.de-schrijver@nokia.com> writes:
> This patch removes the check to see if some functional clocks are still
> enabled before entering sleep.
>
> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Thanks, pushing along with updated C1 patch.
Kevin
> ---
> arch/arm/mach-omap2/pm34xx.c | 46 ------------------------------------------
> 1 files changed, 0 insertions(+), 46 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index e12ff2a..008a4d2 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -453,58 +453,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;
> -
> - /* Ignore GPIO clocks. Handled by GPIO prepare-idle hooks */
> - fck_per &= ~(OMAP3430_EN_GPIO2 | OMAP3430_EN_GPIO3 |
> - OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 | OMAP3430_EN_GPIO6);
> -
> - 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 (!enable_dyn_sleep)
> return 0;
> if (!omap_uart_can_sleep())
> return 0;
> - if (omap3_fclks_active())
> - return 0;
> if (atomic_read(&sleep_block) > 0)
> return 0;
> return 1;
> --
> 1.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-13 22:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-10 16:05 [PATCH] Remove fclk check for cpuidle Peter 'p2' De Schrijver
2009-03-13 22:07 ` Kevin Hilman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.