[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>

authored by Russell King and committed by Russell King 19ca5d27 5528e568

+16
+16
arch/arm/mach-sa1100/irq.c
··· 199 199 ICMR |= (1 << irq); 200 200 } 201 201 202 + /* 203 + * Apart form GPIOs, only the RTC alarm can be a wakeup event. 204 + */ 205 + static 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 + 202 217 static struct irqchip sa1100_normal_chip = { 203 218 .ack = sa1100_mask_irq, 204 219 .mask = sa1100_mask_irq, 205 220 .unmask = sa1100_unmask_irq, 221 + .set_wake = sa1100_set_wake, 206 222 }; 207 223 208 224 static struct resource irq_resource = {