diff options
author | Rickard Andersson <rickard.andersson@stericsson.com> | 2011-06-21 11:29:14 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2011-07-22 15:52:22 +0200 |
commit | a67c4885311d85b3e3b3c6625be6dad6924b656b (patch) | |
tree | a7e21a7214d20cf948919f7d02122487016084b9 /arch | |
parent | 3a0ed9472a4bddc22533bb7097ee4b1c1a7ec18b (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')
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend.c | 17 |
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 46d1c69df21..35bce047754 100644 --- a/arch/arm/mach-ux500/pm/suspend.c +++ b/arch/arm/mach-ux500/pm/suspend.c @@ -167,13 +167,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; } |