diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2412/irq.c | 24 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/irq.c | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c index e9d0c769f5d..cc1917bf952 100644 --- a/arch/arm/mach-s3c2412/irq.c +++ b/arch/arm/mach-s3c2412/irq.c @@ -33,6 +33,7 @@ #include <asm/arch/regs-irq.h> #include <asm/arch/regs-gpio.h> +#include <asm/arch/regs-power.h> #include <asm/plat-s3c24xx/cpu.h> #include <asm/plat-s3c24xx/irq.h> @@ -153,6 +154,22 @@ static struct irq_chip s3c2412_irq_cfsdi = { .unmask = s3c2412_irq_cfsdi_unmask, }; +static int s3c2412_irq_rtc_wake(unsigned int irqno, unsigned int state) +{ + unsigned long pwrcfg; + + pwrcfg = __raw_readl(S3C2412_PWRCFG); + if (state) + pwrcfg &= ~S3C2412_PWRCFG_RTC_MASKIRQ; + else + pwrcfg |= S3C2412_PWRCFG_RTC_MASKIRQ; + __raw_writel(pwrcfg, S3C2412_PWRCFG); + + return s3c_irq_chip.set_wake(irqno, state); +} + +static struct irq_chip s3c2412_irq_rtc_chip; + static int s3c2412_irq_add(struct sys_device *sysdev) { unsigned int irqno; @@ -173,6 +190,13 @@ static int s3c2412_irq_add(struct sys_device *sysdev) set_irq_flags(irqno, IRQF_VALID); } + /* change RTC IRQ's set wake method */ + + s3c2412_irq_rtc_chip = s3c_irq_chip; + s3c2412_irq_rtc_chip.set_wake = s3c2412_irq_rtc_wake; + + set_irq_chip(IRQ_RTC, &s3c2412_irq_rtc_chip); + return 0; } diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index 8fbc8847026..d486f511256 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c @@ -187,7 +187,7 @@ struct irq_chip s3c_irq_level_chip = { .set_wake = s3c_irq_wake }; -static struct irq_chip s3c_irq_chip = { +struct irq_chip s3c_irq_chip = { .name = "s3c", .ack = s3c_irq_ack, .mask = s3c_irq_mask, |