Benoit Cousson <b-cous...@ti.com> writes:

> From: Rajendra Nayak <rna...@ti.com>
>
> omap_set_pwrdm_state today assumes a clkdm supports hw_auto
> transitions and hence leaves some which do not support this
> in sw wkup state preventing low power transitions.
>
> Signed-off-by: Rajendra Nayak <rna...@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilim...@ti.com>
> Acked-by: Benoit Cousson <b-cous...@ti.com>

Acked-by: Kevin Hilman <khil...@deeprootsystems.com>

> ---
>  arch/arm/mach-omap2/pm.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index dc68044..a2a70e1 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -91,8 +91,7 @@ static void omap2_init_processor_devices(void)
>  
>  /*
>   * This sets pwrdm state (other than mpu & core. Currently only ON &
> - * RET are supported. Function is assuming that clkdm doesn't have
> - * hw_sup mode enabled.
> + * RET are supported.
>   */
>  int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
>  {
> @@ -135,7 +134,10 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 
> state)
>       }
>  
>       if (sleep_switch) {
> -             omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
> +             if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO)
> +                     omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
> +             else
> +                     omap2_clkdm_sleep(pwrdm->pwrdm_clkdms[0]);
>               pwrdm_wait_transition(pwrdm);
>               pwrdm_state_switch(pwrdm);
>       }
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to