Commit bd802481 authored by Kalle Jokiniemi's avatar Kalle Jokiniemi Committed by Tony Lindgren

ARM:OMAP3: Smartreflex disable/enable fix

Smartreflex modules have to be disabled when device enters WFI.
Previously only suspend idle path had these calls. By moving the
disable/enable calls to omap_sram_idle, all idle paths will be covered.
Signed-off-by: default avatarKalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e9e9988a
......@@ -166,12 +166,19 @@ static void omap_sram_idle(void)
printk(KERN_ERR "Invalid mpu state in sram_idle\n");
return;
}
/* Disable smartreflex before entering WFI */
disable_smartreflex(SR1);
disable_smartreflex(SR2);
omap2_gpio_prepare_for_retention();
_omap_sram_idle(NULL, save_state);
omap2_gpio_resume_after_retention();
/* Enable smartreflex after WFI */
enable_smartreflex(SR1);
enable_smartreflex(SR2);
}
/*
......@@ -297,10 +304,6 @@ static int omap3_pm_suspend(void)
struct power_state *pwrst;
int state, ret = 0;
/* XXX Disable smartreflex before entering suspend */
disable_smartreflex(SR1);
disable_smartreflex(SR2);
/* Read current next_pwrsts */
list_for_each_entry(pwrst, &pwrst_list, node)
pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
......@@ -332,10 +335,6 @@ restore:
printk(KERN_INFO "Successfully put all powerdomains "
"to target state\n");
/* XXX Enable smartreflex after suspend */
enable_smartreflex(SR1);
enable_smartreflex(SR2);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment