From 84d2b67d4d1afa03782d233df12c5d63627b24d2 Mon Sep 17 00:00:00 2001 From: Rickard Andersson Date: Tue, 21 Jun 2011 11:29:14 +0200 Subject: 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 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25572 Reviewed-by: QATEST Tested-by: Rabin VINCENT Reviewed-by: Linus WALLEIJ --- arch/arm/mach-ux500/pm/suspend.c | 17 ++++++++++++++--- 1 file 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; } -- cgit v1.2.3