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;h=4bb119b2a4d514c3735830beb02a91f0600e56bb;hp=06bc31f7a530633465ee6fd6e32210398a342967;hb=02f106e77e83b075c731069c39c5dcb411866429;hpb=57fda12238988bf601364a8f68c4827c9be5d041 diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 06bc31f7a530..4bb119b2a4d5 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -83,7 +83,6 @@ void (*omap3_do_wfi_sram)(void); static struct powerdomain *mpu_pwrdm, *neon_pwrdm; static struct powerdomain *core_pwrdm, *per_pwrdm; -static struct powerdomain *cam_pwrdm; static inline void omap3_per_save_context(void) { @@ -377,10 +376,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 +394,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(); @@ -443,15 +445,10 @@ void omap_sram_idle(void) } omap_uart_resume_idle(0); omap_uart_resume_idle(1); - if (core_next_state == PWRDM_POWER_OFF) - 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 +457,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,13 +474,13 @@ console_still_active: omap3_disable_io_chain(); } - clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); + if (mpu_next_state < PWRDM_POWER_ON) + pwrdm_post_transition(mpu_pwrdm); } static void omap3_pm_idle(void) { local_irq_disable(); - local_fiq_disable(); if (omap_irq_pending() || need_resched()) goto out; @@ -496,7 +494,6 @@ static void omap3_pm_idle(void) trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); out: - local_fiq_enable(); local_irq_enable(); } @@ -891,7 +888,6 @@ static int __init omap3_pm_init(void) neon_pwrdm = pwrdm_lookup("neon_pwrdm"); per_pwrdm = pwrdm_lookup("per_pwrdm"); core_pwrdm = pwrdm_lookup("core_pwrdm"); - cam_pwrdm = pwrdm_lookup("cam_pwrdm"); neon_clkdm = clkdm_lookup("neon_clkdm"); mpu_clkdm = clkdm_lookup("mpu_clkdm"); @@ -922,14 +918,12 @@ static int __init omap3_pm_init(void) "allocating for secure sram context\n"); local_irq_disable(); - local_fiq_disable(); omap_dma_global_context_save(); omap3_save_secure_ram_context(); omap_dma_global_context_restore(); local_irq_enable(); - local_fiq_enable(); } omap3_save_scratchpad_contents();