summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/pm44xx.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2014-06-05 21:40:39 -0500
committerNishanth Menon <nm@ti.com>2014-09-08 11:22:42 -0500
commit46ba55265254e8f47f8c2af6408841f31bab4870 (patch)
tree773a5fb38b904231dd8f62f26b7642bc4e818037 /arch/arm/mach-omap2/pm44xx.c
parentbd002d7bdafc695decf7d4aeba285097356938f1 (diff)
ARM: OMAP4+: PM: Make logic state programmable
Move the logic state as different for each power domain. This allows us to customize the deepest power state we should target over all for each powerdomain in the follow on patches. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Kevin Hilman <khilman@linaro.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-rw-r--r--arch/arm/mach-omap2/pm44xx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 0dda6cf8b855..b377b03ec1b2 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -29,6 +29,7 @@ u16 pm44xx_errata;
struct power_state {
struct powerdomain *pwrdm;
u32 next_state;
+ u32 next_logic_state;
#ifdef CONFIG_SUSPEND
u32 saved_state;
u32 saved_logic_state;
@@ -54,7 +55,7 @@ static int omap4_pm_suspend(void)
/* Set targeted power domain states by suspend */
list_for_each_entry(pwrst, &pwrst_list, node) {
omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);
- pwrdm_set_logic_retst(pwrst->pwrdm, PWRDM_POWER_OFF);
+ pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->next_logic_state);
}
/*
@@ -121,6 +122,8 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
pwrst->pwrdm = pwrdm;
pwrst->next_state = PWRDM_POWER_RET;
+ pwrst->next_logic_state = PWRDM_POWER_OFF;
+
list_add(&pwrst->node, &pwrst_list);
return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state);