aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm44xx.c
diff options
context:
space:
mode:
authorGirish S Ghongdemath <girishsg@ti.com>2011-12-05 20:02:00 -0600
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:55:08 +0200
commit428a60eb9e68492f165c53aa458705e6e477532f (patch)
tree731e0ba59867888071b4e4394e16b99cd3f06c13 /arch/arm/mach-omap2/pm44xx.c
parent8be54b4497a776f0e92f1641ac10cd86ed9e86a0 (diff)
downloadkernel_samsung_tuna-428a60eb9e68492f165c53aa458705e6e477532f.zip
kernel_samsung_tuna-428a60eb9e68492f165c53aa458705e6e477532f.tar.gz
kernel_samsung_tuna-428a60eb9e68492f165c53aa458705e6e477532f.tar.bz2
OMAP4: PM: Program pwrst of each pwdm as per their supported state
Configure next power state of each power domain based on their supported state. This will be done one time during initialization of power_setup function. Device can change their power domain state runtime based on dev latency requirement. Also, this API will be called during suspend path as well to make sure each power domain has been configured the right state before entering OFF transition. Change-Id: I030f2b5df3186cb147e919d9d98dbcdfc75269a8 Signed-off-by: Gilles-Arnaud Bleu-Laine <gilles@ti.com> Signed-off-by: Girish S G <girishsg@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-rwxr-xr-xarch/arm/mach-omap2/pm44xx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 7ba1aab..f3a8e93 100755
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -562,7 +562,7 @@ static inline u8 get_achievable_state(u8 available_states, u8 req_min_state,
}
/**
- * omap4_configure_pwdm_suspend() - Program powerdomain on suspend
+ * omap4_configure_pwrst() - Program powerdomain to their supported state
* @is_off_mode: is this an OFF mode transition?
*
* Program all powerdomain to required power domain state: This logic
@@ -571,7 +571,7 @@ static inline u8 get_achievable_state(u8 available_states, u8 req_min_state,
* each domain to the state requested. if the requested state is not
* available, it will check for the higher state.
*/
-static void omap4_configure_pwdm_suspend(bool is_off_mode)
+static void omap4_configure_pwrst(bool is_off_mode)
{
struct power_state *pwrst;
u32 state;
@@ -712,7 +712,7 @@ static int omap4_pm_suspend(void)
omap2_pm_wakeup_on_timer(wakeup_timer_seconds,
wakeup_timer_milliseconds);
- omap4_configure_pwdm_suspend(off_mode_enabled);
+ omap4_configure_pwrst(off_mode_enabled);
/* Enable Device OFF */
if (off_mode_enabled)
@@ -867,7 +867,8 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
(!strcmp(pwrdm->name, "cpu1_pwrdm")))
pwrst->next_state = PWRDM_POWER_ON;
else
- pwrst->next_state = PWRDM_POWER_RET;
+ omap4_configure_pwrst(off_mode_enabled);
+
list_add(&pwrst->node, &pwrst_list);
return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);