diff options
-rw-r--r-- | arch/arm/mach-s3c2412/irq.c | 24 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/irq.c | 2 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/irq.h | 2 |
3 files changed, 27 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c index e9d0c769f5da..cc1917bf952a 100644 --- a/arch/arm/mach-s3c2412/irq.c +++ b/arch/arm/mach-s3c2412/irq.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <asm/arch/regs-irq.h> | 34 | #include <asm/arch/regs-irq.h> |
35 | #include <asm/arch/regs-gpio.h> | 35 | #include <asm/arch/regs-gpio.h> |
36 | #include <asm/arch/regs-power.h> | ||
36 | 37 | ||
37 | #include <asm/plat-s3c24xx/cpu.h> | 38 | #include <asm/plat-s3c24xx/cpu.h> |
38 | #include <asm/plat-s3c24xx/irq.h> | 39 | #include <asm/plat-s3c24xx/irq.h> |
@@ -153,6 +154,22 @@ static struct irq_chip s3c2412_irq_cfsdi = { | |||
153 | .unmask = s3c2412_irq_cfsdi_unmask, | 154 | .unmask = s3c2412_irq_cfsdi_unmask, |
154 | }; | 155 | }; |
155 | 156 | ||
157 | static int s3c2412_irq_rtc_wake(unsigned int irqno, unsigned int state) | ||
158 | { | ||
159 | unsigned long pwrcfg; | ||
160 | |||
161 | pwrcfg = __raw_readl(S3C2412_PWRCFG); | ||
162 | if (state) | ||
163 | pwrcfg &= ~S3C2412_PWRCFG_RTC_MASKIRQ; | ||
164 | else | ||
165 | pwrcfg |= S3C2412_PWRCFG_RTC_MASKIRQ; | ||
166 | __raw_writel(pwrcfg, S3C2412_PWRCFG); | ||
167 | |||
168 | return s3c_irq_chip.set_wake(irqno, state); | ||
169 | } | ||
170 | |||
171 | static struct irq_chip s3c2412_irq_rtc_chip; | ||
172 | |||
156 | static int s3c2412_irq_add(struct sys_device *sysdev) | 173 | static int s3c2412_irq_add(struct sys_device *sysdev) |
157 | { | 174 | { |
158 | unsigned int irqno; | 175 | unsigned int irqno; |
@@ -173,6 +190,13 @@ static int s3c2412_irq_add(struct sys_device *sysdev) | |||
173 | set_irq_flags(irqno, IRQF_VALID); | 190 | set_irq_flags(irqno, IRQF_VALID); |
174 | } | 191 | } |
175 | 192 | ||
193 | /* change RTC IRQ's set wake method */ | ||
194 | |||
195 | s3c2412_irq_rtc_chip = s3c_irq_chip; | ||
196 | s3c2412_irq_rtc_chip.set_wake = s3c2412_irq_rtc_wake; | ||
197 | |||
198 | set_irq_chip(IRQ_RTC, &s3c2412_irq_rtc_chip); | ||
199 | |||
176 | return 0; | 200 | return 0; |
177 | } | 201 | } |
178 | 202 | ||
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index 8fbc88470261..d486f5112569 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 = { | |||
187 | .set_wake = s3c_irq_wake | 187 | .set_wake = s3c_irq_wake |
188 | }; | 188 | }; |
189 | 189 | ||
190 | static struct irq_chip s3c_irq_chip = { | 190 | struct irq_chip s3c_irq_chip = { |
191 | .name = "s3c", | 191 | .name = "s3c", |
192 | .ack = s3c_irq_ack, | 192 | .ack = s3c_irq_ack, |
193 | .mask = s3c_irq_mask, | 193 | .mask = s3c_irq_mask, |
diff --git a/include/asm-arm/plat-s3c24xx/irq.h b/include/asm-arm/plat-s3c24xx/irq.h index 8af6d9579b31..45746a995343 100644 --- a/include/asm-arm/plat-s3c24xx/irq.h +++ b/include/asm-arm/plat-s3c24xx/irq.h | |||
@@ -15,7 +15,9 @@ | |||
15 | 15 | ||
16 | #define EXTINT_OFF (IRQ_EINT4 - 4) | 16 | #define EXTINT_OFF (IRQ_EINT4 - 4) |
17 | 17 | ||
18 | /* these are exported for arch/arm/mach-* usage */ | ||
18 | extern struct irq_chip s3c_irq_level_chip; | 19 | extern struct irq_chip s3c_irq_level_chip; |
20 | extern struct irq_chip s3c_irq_chip; | ||
19 | 21 | ||
20 | static inline void | 22 | static inline void |
21 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, | 23 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, |