summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx5/pm.c9
-rw-r--r--arch/arm/plat-mxc/tzic.c4
-rw-r--r--arch/arm/plat-mxc/usb_common.c1
3 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/pm.c b/arch/arm/mach-mx5/pm.c
index c257e049bd9f..a63d6e725e8f 100644
--- a/arch/arm/mach-mx5/pm.c
+++ b/arch/arm/mach-mx5/pm.c
@@ -26,6 +26,7 @@
#include <asm/mach/map.h>
#include <mach/hardware.h>
#include "crm_regs.h"
+#include "mach/irqs.h"
static struct cpu_wp *cpu_wp_tbl;
static struct clk *cpu_clk;
@@ -50,6 +51,14 @@ void (*suspend_in_iram)(void *sdclk_iomux_addr) = NULL;
static int mx51_suspend_enter(suspend_state_t state)
{
void __iomem *sdclk_iomux_addr = IO_ADDRESS(IOMUXC_BASE_ADDR + 0x4b8);
+ u32 * wake_src;
+
+ /* Check that we have a wake up source. We don't want to suspend if not.*/
+ mxc_get_wake_irq(&wake_src);
+ if ( !wake_src[0] && !wake_src[1] && !wake_src[2] && !wake_src[3] ) {
+ printk(KERN_ERR "No sources enabled for wake-up! Sleep abort.\n");
+ return -EINVAL;
+ }
if (gpc_dvfs_clk == NULL)
gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs_clk");
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c
index bcca6ac465a2..8707744fd3d1 100644
--- a/arch/arm/plat-mxc/tzic.c
+++ b/arch/arm/plat-mxc/tzic.c
@@ -105,6 +105,10 @@ static int mxc_set_wake_irq(unsigned int irq, unsigned int enable)
return 0;
}
+void mxc_get_wake_irq(u32 * wake_src[])
+{
+ *wake_src = wakeup_intr;
+}
static struct irq_chip mxc_tzic_chip = {
.name = "MXC_TZIC",
diff --git a/arch/arm/plat-mxc/usb_common.c b/arch/arm/plat-mxc/usb_common.c
index c8b8ba41b559..2f5f597f806e 100644
--- a/arch/arm/plat-mxc/usb_common.c
+++ b/arch/arm/plat-mxc/usb_common.c
@@ -447,7 +447,6 @@ static int usb_register_remote_wakeup(struct platform_device *pdev)
}
irq = res->start;
pdev->dev.power.can_wakeup = 1;
- enable_irq_wake(irq);
return 0;
}