summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/gpc.c
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2014-10-27 11:09:42 +0800
committerAnson Huang <b20788@freescale.com>2014-10-28 16:54:25 +0800
commitdf979e224017b44066c9a56e2dbbfbefa59b933d (patch)
treea82e4af1ea5600462de1be65ddb9aa999d9b4af8 /arch/arm/mach-imx/gpc.c
parent2db17272d867fc9c8c842e45cedbb621ff9242d6 (diff)
MLK-9715-2 arm: imx: add wakeup source request for m4
as some modules enabled in M4 side need to support wake up function, so when CCM is in STOP mode, these M4's modules should be able to wake up CCM, add this request to enable wakeup source in GPC. Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/gpc.c')
-rw-r--r--arch/arm/mach-imx/gpc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index ff8074b329a3..3c38371225ce 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -165,6 +165,20 @@ static void imx_gpc_dispmix_off(void)
}
}
+void imx_gpc_add_m4_wake_up_irq(u32 irq, bool enable)
+{
+ unsigned int idx = irq / 32 - 1;
+ u32 mask;
+
+ /* Sanity check for SPI irq */
+ if (irq < 32)
+ return;
+
+ mask = 1 << irq % 32;
+ gpc_wake_irqs[idx] = enable ? gpc_wake_irqs[idx] | mask :
+ gpc_wake_irqs[idx] & ~mask;
+}
+
unsigned int imx_gpc_is_m4_sleeping(void)
{
if (readl_relaxed(gpc_base + GPC_M4_LPSR) &