From: Tero Kristo <[email protected]>

IVA2 controls its target power state individually, thus suspend should not
touch IVA2. Without this patch DSP suspend always fails.

Signed-off-by: Tero Kristo <[email protected]>
Acked-by: Ameya Palande <[email protected]>
---
 arch/arm/mach-omap2/pm34xx.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index a3e3729..5e2ef63 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -81,7 +81,7 @@ static int (*_omap_save_secure_sram)(u32 *addr);
 
 static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
 static struct powerdomain *core_pwrdm, *per_pwrdm;
-static struct powerdomain *cam_pwrdm;
+static struct powerdomain *cam_pwrdm, *iva2_pwrdm;
 
 static struct prm_setup_vc prm_setup = {
        .clksetup = 0xff,
@@ -676,6 +676,12 @@ static int omap3_pm_suspend(void)
                pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
        /* Set ones wanted by suspend */
        list_for_each_entry(pwrst, &pwrst_list, node) {
+               /* Special handling for IVA2, just use current sleep state */
+               if (pwrst->pwrdm == iva2_pwrdm) {
+                       state = pwrdm_read_pwrst(pwrst->pwrdm);
+                       if (state < PWRDM_POWER_ON)
+                               pwrst->next_state = state;
+               }
                if (set_pwrdm_state(pwrst->pwrdm, pwrst->next_state))
                        goto restore;
                if (pwrdm_clear_all_prev_pwrst(pwrst->pwrdm))
@@ -1183,6 +1189,7 @@ static int __init omap3_pm_init(void)
        per_pwrdm = pwrdm_lookup("per_pwrdm");
        core_pwrdm = pwrdm_lookup("core_pwrdm");
        cam_pwrdm = pwrdm_lookup("cam_pwrdm");
+       iva2_pwrdm = pwrdm_lookup("iva2_pwrdm");
 
        omap_push_sram_idle();
 #ifdef CONFIG_SUSPEND
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to