]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP3: PM: Emu_pwrdm is switched off by hardware even when sdti is in use v2.6.28-omap1
authorJouni Hogander <jouni.hogander@nokia.com>
Fri, 9 Jan 2009 07:52:33 +0000 (09:52 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 9 Jan 2009 12:14:02 +0000 (14:14 +0200)
Using sdti doesn't keep emu_pwrdm on if hardware supervised pwrdm
transitions are used. This causes sdti stop to work when power
management is initialized and hardware supervised pwrdm control is
enabled. This patch disables hardware supervised pwrdm control for
emu_pwrdm. Now emu_pwrdm is switched off on boot by software when it
is not used.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clockdomains.h
arch/arm/mach-omap2/pm34xx.c

index bafa650e9271f6f5953390b12f7287dec199abc4..3d4eaca3442ac7293e2c95bc394b5f316bcecc61 100644 (file)
@@ -251,10 +251,14 @@ static struct clockdomain per_clkdm = {
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };
 
+/*
+ * Disable hw supervised mode for emu_clkdm, because emu_pwrdm is
+ * switched of even if sdti is in use
+ */
 static struct clockdomain emu_clkdm = {
        .name           = "emu_clkdm",
        .pwrdm          = { .name = "emu_pwrdm" },
-       .flags          = CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_SWSUP,
+       .flags          = /* CLKDM_CAN_ENABLE_AUTO |  */CLKDM_CAN_SWSUP,
        .clktrctrl_mask = OMAP3430_CLKTRCTRL_EMU_MASK,
        .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };
index 1d54e96f16daf4367433915c47a3501f4f7b16b3..43aac5f6031983f6129064caca3cc32f774feecd 100644 (file)
@@ -605,9 +605,18 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm)
        return set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
 }
 
+/*
+ * Enable hw supervised mode for all clockdomains if it's
+ * supported. Initiate sleep transition for other clockdomains, if
+ * they are not used
+ */
 static int __init clkdms_setup(struct clockdomain *clkdm)
 {
-       omap2_clkdm_allow_idle(clkdm);
+       if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO)
+               omap2_clkdm_allow_idle(clkdm);
+       else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP &&
+                atomic_read(&clkdm->usecount) == 0)
+               omap2_clkdm_sleep(clkdm);
        return 0;
 }