]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
34XX: PM: Workaround to reset all wkdeps
authorJouni Hogander <jouni.hogander@nokia.com>
Mon, 30 Jun 2008 08:52:43 +0000 (11:52 +0300)
committerTony Lindgren <tony@atomide.com>
Thu, 3 Jul 2008 10:38:57 +0000 (13:38 +0300)
This workaround is needed until powerdomain code resets wkdeps.

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

index 202c269568a3b045126f4045c0fdd8f76d1340be..449e7b5aeaa34dc8161b7725d867b06e5002d419 100644 (file)
@@ -332,6 +332,20 @@ static struct platform_suspend_ops omap_pm_ops = {
 
 static void __init prcm_setup_regs(void)
 {
+       /* XXX Reset all wkdeps. This should be done when initializing
+        * powerdomains */
+       prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
+       prm_write_mod_reg(0, MPU_MOD, PM_WKDEP);
+       prm_write_mod_reg(0, OMAP3430_DSS_MOD, PM_WKDEP);
+       prm_write_mod_reg(0, OMAP3430_NEON_MOD, PM_WKDEP);
+       prm_write_mod_reg(0, OMAP3430_CAM_MOD, PM_WKDEP);
+       prm_write_mod_reg(0, OMAP3430_PER_MOD, PM_WKDEP);
+       if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+               prm_write_mod_reg(0, OMAP3430ES2_SGX_MOD, PM_WKDEP);
+               prm_write_mod_reg(0, OMAP3430ES2_USBHOST_MOD, PM_WKDEP);
+       } else
+               prm_write_mod_reg(0, GFX_MOD, PM_WKDEP);
+
        /* setup wakup source */
        prm_write_mod_reg(OMAP3430_EN_IO | OMAP3430_EN_GPIO1 | OMAP3430_EN_GPT1,
                          WKUP_MOD, PM_WKEN);
@@ -371,6 +385,10 @@ int __init omap3_pm_init(void)
 
        printk(KERN_ERR "Power Management for TI OMAP3.\n");
 
+       /* XXX prcm_setup_regs needs to be before enabling hw
+        * supervised mode for powerdomains */
+       prcm_setup_regs();
+
        ret = request_irq(INT_34XX_PRCM_MPU_IRQ,
                          (irq_handler_t)prcm_interrupt_handler,
                          IRQF_DISABLED, "prcm", NULL);
@@ -397,8 +415,6 @@ int __init omap3_pm_init(void)
 
        suspend_set_ops(&omap_pm_ops);
 
-       prcm_setup_regs();
-
        pm_idle = omap3_pm_idle;
 
 err1: