16 #include <linux/bitops.h>
17 #include <linux/errno.h>
21 #include <linux/module.h>
22 #include <linux/types.h>
32 #define DEBPRINTK printk
34 #define DEBPRINTK(x,...)
41 printk(
"cannot get irq\n");
60 printk(
"cannot claim irq %d\n", c);
87 int local_irq =
__ffs(irr);
90 irr &= ~(1 << local_irq);
100 for (local_irq = 0; local_irq <
limit; local_irq++) {
101 if (global_irqs[local_irq] == irq)
108 static void gsc_asic_mask_irq(
struct irq_data *
d)
110 struct gsc_asic *irq_dev = irq_data_get_irq_chip_data(d);
119 imr &= ~(1 << local_irq);
123 static void gsc_asic_unmask_irq(
struct irq_data *
d)
125 struct gsc_asic *irq_dev = irq_data_get_irq_chip_data(d);
134 imr |= 1 << local_irq;
142 static struct irq_chip gsc_asic_interrupt_type = {
144 .irq_unmask = gsc_asic_unmask_irq,
145 .irq_mask = gsc_asic_mask_irq,
150 static int irq = GSC_IRQ_BASE;
152 if (irq > GSC_IRQ_MAX)
180 static int gsc_fixup_irqs_callback(
struct device *
dev,
void *
data)
213 for (i = 0; i < 32; i++) {
225 parent->
irq, gsc_asic->
eim);
227 printk(
" IMR is non-zero! (0x%x)",
241 #ifdef CONFIG_GSC_LASI
245 #ifdef CONFIG_GSC_WAX