From 08d065672d7b1a9372c005214c1286a72aed7d36 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Sun, 23 Dec 2007 03:09:33 +0100 Subject: [PATCH] --- yaml --- r: 77483 b: refs/heads/master c: 0baada2742a42390a2ebed09e07e1fab518db884 h: refs/heads/master i: 77481: eae9c2d777703de929994ba8d87c8d26536b8bc2 77479: a9aa02092e42e993448e27dc90333f5be907d194 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-s3c2412/irq.c | 24 ++++++++++++++++++++++++ trunk/arch/arm/plat-s3c24xx/irq.c | 2 +- trunk/include/asm-arm/plat-s3c24xx/irq.h | 2 ++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ecfa5cd8fb86..c9ff6077d4f7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8e3007a0e8a0d2f5e3139cb9fe606c2a998b9ed3 +refs/heads/master: 0baada2742a42390a2ebed09e07e1fab518db884 diff --git a/trunk/arch/arm/mach-s3c2412/irq.c b/trunk/arch/arm/mach-s3c2412/irq.c index e9d0c769f5da..cc1917bf952a 100644 --- a/trunk/arch/arm/mach-s3c2412/irq.c +++ b/trunk/arch/arm/mach-s3c2412/irq.c @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -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/trunk/arch/arm/plat-s3c24xx/irq.c b/trunk/arch/arm/plat-s3c24xx/irq.c index 8fbc88470261..d486f5112569 100644 --- a/trunk/arch/arm/plat-s3c24xx/irq.c +++ b/trunk/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, diff --git a/trunk/include/asm-arm/plat-s3c24xx/irq.h b/trunk/include/asm-arm/plat-s3c24xx/irq.h index 8af6d9579b31..45746a995343 100644 --- a/trunk/include/asm-arm/plat-s3c24xx/irq.h +++ b/trunk/include/asm-arm/plat-s3c24xx/irq.h @@ -15,7 +15,9 @@ #define EXTINT_OFF (IRQ_EINT4 - 4) +/* these are exported for arch/arm/mach-* usage */ extern struct irq_chip s3c_irq_level_chip; +extern struct irq_chip s3c_irq_chip; static inline void s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,