> -----Original Message----- > From: Gulati, Shweta > Sent: Wednesday, March 24, 2010 7:16 PM > To: linux-omap@xxxxxxxxxxxxxxx > Cc: Gulati, Shweta; Sripathy, Vishwanath > Subject: [PATCH L23.I3 PM 2/2]: Setting Mpu registers properly when > enable_off_mode is enabled Subject should be [PATCH 2/2] OMAP3 PM: Setting Mpu registers properly when enable_off_mode is enabled. Do not put TI Internal release names. > > From: Shweta Gulati <shweta.gulati@xxxxxx> > > When enable_off_mode is enabled and ROM code issues WFI, the > powerstate of all the powerdomains is set as OFF in PM_PWSTCTRL > register and when it restores back the system to previous state > it sets MPU as OFF and system hangs. > > This Patch ensures that for MPU the state is ON after it comes out of > Idle/Suspend till it renters Idle. > > > Signed-off-by: Vishwanath BS <Vishwanath.bs@xxxxxx> > Signed-off-by: Shweta Gulati <shweta.gulati@xxxxxx> > --- > Index: kernel-omap3-dev/arch/arm/mach-omap2/pm34xx.c > ===================================================== > ============== > --- kernel-omap3-dev.orig/arch/arm/mach-omap2/pm34xx.c > +++ kernel-omap3-dev/arch/arm/mach-omap2/pm34xx.c > @@ -573,8 +573,14 @@ void omap_sram_idle(void) > _omap_sram_idle(omap3_arm_context, save_state); > cpu_init(); > > + > if (is_suspending()) > pm_dbg_regset_save(2); > + /* Ensure that Mpu state is restored back as ON > + * after coming out of suspend/Idle. > + */ > + prm_rmw_mod_reg_bits(OMAP_POWERSTATEST_MASK, 0x3, > + MPU_MOD, PM_PWSTCTRL); > > /* Restore normal SDRC POWER settings */ > if (omap_rev() >= OMAP3430_REV_ES3_0 && > @@ -1209,10 +1215,16 @@ void omap3_pm_off_mode_enable(int enable > resource_unlock_opp(VDD1_OPP); > resource_unlock_opp(VDD2_OPP); > #endif > + /* For Mpu only next state should be set as OFF, the > + * powerstate bits of PM_PWSTCTRL_MPU should not be explicitily > + * set as OFF > + */ > + > list_for_each_entry(pwrst, &pwrst_list, node) { > if (strcmp("iva2_pwrdm", pwrst->pwrdm->name)) { > pwrst->next_state = state; > - set_pwrdm_state(pwrst->pwrdm, state); > + if (strcmp("mpu_pwrdm", pwrst->pwrdm->name)) > + set_pwrdm_state(pwrst->pwrdm, state); > } > } > } -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html