23 #include <linux/module.h>
26 #include <linux/device.h>
29 #include <mach/hardware.h>
34 #include <mach/regs-irq.h>
35 #include <mach/regs-gpio.h>
42 #define INTMSK(start, end) ((1 << ((end) + 1 - (start))) - 1)
43 #define INTMSK_SUB(start, end) (INTMSK(start, end) << ((start - S3C2410_IRQSUB(0))))
104 static struct irq_chip s3c2412_irq_eint0t4 = {
105 .irq_ack = s3c2412_irq_ack,
106 .irq_mask = s3c2412_irq_mask,
107 .irq_unmask = s3c2412_irq_unmask,
112 #define INTBIT(x) (1 << ((x) - S3C2410_IRQSUB(0)))
116 static void s3c2412_irq_demux_cfsdi(
unsigned int irq,
struct irq_desc *
desc)
118 unsigned int subsrc, submsk;
132 #define INTMSK_CFSDI (1UL << (IRQ_S3C2412_CFSDI - IRQ_EINT0))
133 #define SUBMSK_CFSDI INTMSK_SUB(IRQ_S3C2412_SDI, IRQ_S3C2412_CF)
135 static void s3c2412_irq_cfsdi_mask(
struct irq_data *
data)
140 static void s3c2412_irq_cfsdi_unmask(
struct irq_data *
data)
145 static void s3c2412_irq_cfsdi_ack(
struct irq_data *
data)
150 static struct irq_chip s3c2412_irq_cfsdi = {
151 .name =
"s3c2412-cfsdi",
152 .irq_ack = s3c2412_irq_cfsdi_ack,
153 .irq_mask = s3c2412_irq_cfsdi_mask,
154 .irq_unmask = s3c2412_irq_cfsdi_unmask,
159 unsigned long pwrcfg;
171 static struct irq_chip s3c2412_irq_rtc_chip;
178 irq_set_chip_and_handler(irqno, &s3c2412_irq_eint0t4,
188 irq_set_chip_and_handler(irqno, &s3c2412_irq_cfsdi,
196 s3c2412_irq_rtc_chip.irq_set_wake = s3c2412_irq_rtc_wake;
204 .name =
"s3c2412_irq",
206 .add_dev = s3c2412_irq_add,
209 static int s3c2412_irq_init(
void)