On Thu, Jul 28, 2011 at 10:30:14AM +0200, jean.pihet@xxxxxxxxxxxxxx wrote: > From: Jean Pihet <j-pihet@xxxxxx> > > The powerdomains next states are initialized in pwrdms_setup as a > late_initcall. Because the PM QoS devices constraint can be requested > early in the boot sequence, the power domains next states can be > overwritten by pwrdms_setup. > > This patch fixes it by initializing the power domains next states > early at boot, so that the constraints can be applied. > Later in the pwrdms_setup function the currently programmed > next states are re-used as next state values. > > Applies to OMAP3 and OMAP4. > > Tested on OMAP3 Beagleboard and OMAP4 Pandaboard in RET/OFF using > wake-up latency constraints on MPU, CORE and PER. > > Signed-off-by: Jean Pihet <j-pihet@xxxxxx> > --- ... > diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c > index 9af0847..63c3e7a 100644 > --- a/arch/arm/mach-omap2/powerdomain.c > +++ b/arch/arm/mach-omap2/powerdomain.c > @@ -108,6 +108,9 @@ static int _pwrdm_register(struct powerdomain *pwrdm) > pwrdm->state = pwrdm_read_pwrst(pwrdm); > pwrdm->state_counter[pwrdm->state] = 1; > > + /* Early init of the next power state */ > + pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_RET); > + Wanted to check that it's OK to initialize the next state of a power domain to RETENTION early in the boot sequence. I believe patches have been previously discussed that set the state to ON to ensure the domain doesn't go to a lower state, and possibly lose context, before the PM subsystem is setup to handle it? Not sure, thought maybe worth a doublecheck. Todd -- 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