18 #include <linux/module.h>
21 #include <linux/ptrace.h>
22 #include <linux/device.h>
28 #include <mach/hardware.h>
29 #include <mach/regs-irq.h>
41 #define DEFINE_GROUP(_name, _ctrlbit, _num) \
42 struct group_irq group_##_name = { \
43 .enable = nuc900_group_enable, \
44 .gpen = ((1 << _num) - 1) << _ctrlbit, \
64 (group_irq->
enable)(group_irq, 1);
65 spin_unlock_irqrestore(&groupirq_lock, flags);
70 static void group_irq_disable(
struct group_irq *group_irq)
78 (group_irq->
enable)(group_irq, 0);
79 spin_unlock_irqrestore(&groupirq_lock, flags);
82 static void nuc900_group_enable(
struct group_irq *gpirq,
int enable)
84 unsigned int groupen = gpirq->
gpen;
97 static void nuc900_irq_mask(
struct irq_data *
d)
99 struct group_irq *group_irq;
107 group_irq = &group_nirq0;
111 group_irq = &group_nirq1;
115 group_irq = &group_usbh;
119 group_irq = &group_ottimer;
123 group_irq = &group_gdma;
127 group_irq = &group_sc;
131 group_irq = &group_i2c;
135 group_irq = &group_ps2;
140 group_irq_disable(group_irq);
148 static void nuc900_irq_ack(
struct irq_data *d)
153 static void nuc900_irq_unmask(
struct irq_data *d)
155 struct group_irq *group_irq;
163 group_irq = &group_nirq0;
167 group_irq = &group_nirq1;
171 group_irq = &group_usbh;
175 group_irq = &group_ottimer;
179 group_irq = &group_gdma;
183 group_irq = &group_sc;
187 group_irq = &group_i2c;
191 group_irq = &group_ps2;
196 group_irq_enable(group_irq);
199 static struct irq_chip nuc900_irq_chip = {
200 .irq_ack = nuc900_irq_ack,
201 .irq_mask = nuc900_irq_mask,
202 .irq_unmask = nuc900_irq_unmask,
212 irq_set_chip_and_handler(irqno, &nuc900_irq_chip,