X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=arch%2Farm%2Fmach-omap2%2Fpm34xx.c;fp=arch%2Farm%2Fmach-omap2%2Fpm34xx.c;h=d039d0025af393aab6472fa20f54b3a933be8830;hp=06bc31f7a530633465ee6fd6e32210398a342967;hb=5fd7e69e4cb59973ca0b6fd35bb17320a720eb62;hpb=57fda12238988bf601364a8f68c4827c9be5d041 diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 06bc31f7a530..d039d0025af3 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -377,10 +377,12 @@ void omap_sram_idle(void) if (!console_trylock()) goto console_still_active; - pwrdm_pre_transition(NULL); + if (mpu_next_state < PWRDM_POWER_ON) + pwrdm_pre_transition(mpu_pwrdm); /* PER */ if (per_next_state < PWRDM_POWER_ON) { + pwrdm_pre_transition(per_pwrdm); per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; omap_uart_prepare_idle(2); omap_uart_prepare_idle(3); @@ -393,6 +395,7 @@ void omap_sram_idle(void) if (core_next_state < PWRDM_POWER_ON) { omap_uart_prepare_idle(0); omap_uart_prepare_idle(1); + pwrdm_pre_transition(core_pwrdm); if (core_next_state == PWRDM_POWER_OFF) { omap3_core_save_context(); omap3_cm_save_context(); @@ -447,11 +450,10 @@ 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) { per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); @@ -460,6 +462,7 @@ void omap_sram_idle(void) omap3_per_restore_context(); omap_uart_resume_idle(2); omap_uart_resume_idle(3); + pwrdm_post_transition(per_pwrdm); } if (!is_suspending()) @@ -476,6 +479,9 @@ console_still_active: omap3_disable_io_chain(); } + if (mpu_next_state < PWRDM_POWER_ON) + pwrdm_post_transition(mpu_pwrdm); + clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); }