ARM: 8362/1: sa1100: use sa11x0_sc_set_wake() in irq driver
Use new function controlling PWER register in IRQ driver. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
982b465a2f
commit
a657d7f679
|
@ -18,6 +18,8 @@
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
#include <linux/syscore_ops.h>
|
#include <linux/syscore_ops.h>
|
||||||
|
|
||||||
|
#include <soc/sa1100/pwer.h>
|
||||||
|
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/irqs.h>
|
#include <mach/irqs.h>
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
|
@ -40,19 +42,9 @@ static void sa1100_unmask_irq(struct irq_data *d)
|
||||||
ICMR |= BIT(d->hwirq);
|
ICMR |= BIT(d->hwirq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Apart form GPIOs, only the RTC alarm can be a wakeup event.
|
|
||||||
*/
|
|
||||||
static int sa1100_set_wake(struct irq_data *d, unsigned int on)
|
static int sa1100_set_wake(struct irq_data *d, unsigned int on)
|
||||||
{
|
{
|
||||||
if (BIT(d->hwirq) == IC_RTCAlrm) {
|
return sa11x0_sc_set_wake(d->hwirq, on);
|
||||||
if (on)
|
|
||||||
PWER |= PWER_RTC;
|
|
||||||
else
|
|
||||||
PWER &= ~PWER_RTC;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct irq_chip sa1100_normal_chip = {
|
static struct irq_chip sa1100_normal_chip = {
|
||||||
|
|
Loading…
Reference in a new issue