aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm44xx.c
diff options
context:
space:
mode:
authorAxel Haslam <axelhaslam@ti.com>2011-07-11 22:00:44 +0530
committerNishanth Menon <nm@ti.com>2011-07-14 11:57:21 -0700
commite0dfb36d4af8d4d1dcbcbc55cf88e69c47d6a90e (patch)
tree20f733dd555544b4be013c7bf0cc71963c4752b5 /arch/arm/mach-omap2/pm44xx.c
parentf905c6a0fa5961f6101dbfff837c24c1fdbd2592 (diff)
downloadkernel_samsung_tuna-e0dfb36d4af8d4d1dcbcbc55cf88e69c47d6a90e.zip
kernel_samsung_tuna-e0dfb36d4af8d4d1dcbcbc55cf88e69c47d6a90e.tar.gz
kernel_samsung_tuna-e0dfb36d4af8d4d1dcbcbc55cf88e69c47d6a90e.tar.bz2
OMAP4: PM: enable wakeup irq for PRCM and SYS_1N
Wake-up enable bits need to be set by each driver, but some specific irq's do not have a driver as such, and still have to be set as wakeup enable. This is the case of PRCM and SYS_1N. For these irq's, we handle wakeup enable bits on the suspend path. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Axel Haslam <axelhaslam@ti.com> Signed-off-by: Deepak K<deepak.k@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-rw-r--r--arch/arm/mach-omap2/pm44xx.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 5aad31d..3eea05f 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -155,6 +155,15 @@ void omap4_enter_sleep(unsigned int cpu, unsigned int power_state)
return;
}
+/* We set the wake-up enable bits for irq's that have to be wakeup capable but
+ * are not associated with a specific driver.
+ */
+static void omap4_pm_set_wakeups(int enable)
+{
+ irq_set_irq_wake(OMAP44XX_IRQ_PRCM, enable);
+ irq_set_irq_wake(OMAP44XX_IRQ_SYS_1N, enable);
+}
+
static int omap4_pm_suspend(void)
{
struct power_state *pwrst;
@@ -171,6 +180,9 @@ static int omap4_pm_suspend(void)
pwrst->saved_logic_state = pwrdm_read_logic_retst(pwrst->pwrdm);
}
+ /* Enable wake-up irq's */
+ omap4_pm_set_wakeups(1);
+
/* Set targeted power domain states by suspend */
list_for_each_entry(pwrst, &pwrst_list, node) {
if ((!strcmp(pwrst->pwrdm->name, "cpu0_pwrdm")) ||
@@ -198,6 +210,9 @@ static int omap4_pm_suspend(void)
*/
omap4_enter_sleep(0, PWRDM_POWER_OFF);
+ /* Disable wake-up irq's */
+ omap4_pm_set_wakeups(0);
+
/* Restore next powerdomain state */
list_for_each_entry(pwrst, &pwrst_list, node) {
state = pwrdm_read_prev_pwrst(pwrst->pwrdm);