summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Wylder <jwylder@motorola.com>2014-03-28 10:19:46 -0500
committerJames Wylder <jwylder@motorola.com>2014-03-28 20:51:25 +0000
commit5987c05866c63bc4484fba5bfe119d9448e5feb5 (patch)
treec475cfa882c7acfadce30d89106588a3b12f5b1e
parent10930f2a304c875c5f65927fdc9ebc38c14b1848 (diff)
downloadolio-linux-3.10-5987c05866c63bc4484fba5bfe119d9448e5feb5.tar.xz
olio-linux-3.10-5987c05866c63bc4484fba5bfe119d9448e5feb5.zip
IKXCLOCK-583 arm: omap2: pm should set suspend in early resume
On omap34xx, the suspend flag in pcrm sets a clear of the irq register so that interrupts are deferred during early stages of resume. This code must not be called prior to suspend or the device will not wakeup for the pcrm domain. For omap34xx devices, the PRM MPU block apparently must be masked during early stages of resume. This is currently done by setting the suspend flag in omap_pm_begin(). This should then be read during the interrupt handler during wakeup and used to save and clear the pending interrupt. The interrupt is then disabled. Once enough hw is enabled, the interrupts are restored and the interrupts are re-enabled. In cases where the device is not resumed from the MPU block, pending interrupts can fire during the suspend phase, causing the IRQs to be disabled during suspend. The setting of the suspend flag is moved to early in the resume phase to prevent any disabling of interrupts during suspend. Change-Id: Ia09664b89af41bd5879620722624bf3169d9eff4 Signed-off-by: James Wylder <jwylder@motorola.com>
-rw-r--r--arch/arm/mach-omap2/pm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 9f213c3ad7f..ce40d586464 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -208,6 +208,8 @@ static int omap_pm_enter(suspend_state_t suspend_state)
case PM_SUSPEND_STANDBY:
case PM_SUSPEND_MEM:
ret = omap_pm_suspend();
+ if (cpu_is_omap34xx())
+ omap_prcm_irq_prepare();
break;
default:
ret = -EINVAL;
@@ -219,8 +221,6 @@ static int omap_pm_enter(suspend_state_t suspend_state)
static int omap_pm_begin(suspend_state_t state)
{
cpu_idle_poll_ctrl(true);
- if (cpu_is_omap34xx())
- omap_prcm_irq_prepare();
return 0;
}