aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorRickard Andersson <rickard.andersson@stericsson.com>2011-06-21 11:29:14 +0200
committersaid m bagheri <ebgheri@steludxu2848.(none)>2011-06-29 10:30:37 +0200
commit84d2b67d4d1afa03782d233df12c5d63627b24d2 (patch)
tree5efa2828139d330ce0651fc31d965aa4987d9692 /arch/arm/mach-ux500
parent3c77dae8809db143932e463728cf064aecedec06 (diff)
ARM: ux500: Suspend works independently
Suspend now works completely independently from CPU idle. Also suspend now works as normal when the following flags are not set CONFIG_UX500_SUSPEND_STANDBY and CONFIG_UX500_SUSPEND_MEM. ST-Ericsson Linux next: - ST-Ericsson ID: ER345700 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I54c7d4e5764a683db69b3416e55d41cad0a5f658 Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25572 Reviewed-by: QATEST Tested-by: Rabin VINCENT <rabin.vincent@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/pm/suspend.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/pm/suspend.c b/arch/arm/mach-ux500/pm/suspend.c
index 1f50fec5958..15c8e24f1e0 100644
--- a/arch/arm/mach-ux500/pm/suspend.c
+++ b/arch/arm/mach-ux500/pm/suspend.c
@@ -170,13 +170,24 @@ static int ux500_suspend_enter(suspend_state_t state)
return suspend(true);
if (ux500_suspend_sleep_enabled())
return suspend(false);
- /* For debugging, if Sleep and DeepSleep disabled, do Idle */
- if (!cpu_is_u5500())
- prcmu_set_power_state(PRCMU_AP_IDLE, true, true);
}
+ ux500_suspend_dbg_add_wake_on_uart();
+ /*
+ * Set IOFORCE in order to wake on GPIO the same way
+ * as in deeper sleep.
+ * (U5500 is not ready for IOFORCE)
+ */
+ if (!cpu_is_u5500())
+ ux500_pm_prcmu_set_ioforce(true);
+
dsb();
__asm__ __volatile__("wfi\n\t" : : : "memory");
+
+ if (!cpu_is_u5500())
+ ux500_pm_prcmu_set_ioforce(false);
+ ux500_suspend_dbg_remove_wake_on_uart();
+
return 0;
}