aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-05-06 06:26:30 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-05-06 06:26:30 -0400
commit19ca5d27e15c10d8529984ecd98dcba2637edcd2 (patch)
treeb4ad4055362306c184a12cdf040b0ce515de25e9 /arch/arm
parent5528e568a760442e0ec8fd2dea1f0791875a066b (diff)
[ARM] Allow SA1100 RTC alarm to be configured for wakeup
The SA1100 RTC alarm can be configured to wake up the CPU from sleep mode, and the RTC driver has been using the API to configure this mode. Unfortunately, the code was which sets the required bit in the hardware was missing. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-sa1100/irq.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index c131a5201b5b..b3a56024182e 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -199,10 +199,26 @@ static void sa1100_unmask_irq(unsigned int irq)
199 ICMR |= (1 << irq); 199 ICMR |= (1 << irq);
200} 200}
201 201
202/*
203 * Apart form GPIOs, only the RTC alarm can be a wakeup event.
204 */
205static int sa1100_set_wake(unsigned int irq, unsigned int on)
206{
207 if (irq == IRQ_RTCAlrm) {
208 if (on)
209 PWER |= PWER_RTC;
210 else
211 PWER &= ~PWER_RTC;
212 return 0;
213 }
214 return -EINVAL;
215}
216
202static struct irqchip sa1100_normal_chip = { 217static struct irqchip sa1100_normal_chip = {
203 .ack = sa1100_mask_irq, 218 .ack = sa1100_mask_irq,
204 .mask = sa1100_mask_irq, 219 .mask = sa1100_mask_irq,
205 .unmask = sa1100_unmask_irq, 220 .unmask = sa1100_unmask_irq,
221 .set_wake = sa1100_set_wake,
206}; 222};
207 223
208static struct resource irq_resource = { 224static struct resource irq_resource = {