18 #define NUM_EXTERNAL_IRQS 16
43 #if (MICRODEV_LINUX_IRQ_KEYBOARD != 1)
44 # error Inconsistancy in defining the IRQ# for Keyboard!
47 #if (MICRODEV_LINUX_IRQ_ETHERNET != 3)
48 # error Inconsistancy in defining the IRQ# for Ethernet!
51 #if (MICRODEV_LINUX_IRQ_USB_HC != 7)
52 # error Inconsistancy in defining the IRQ# for USB!
55 #if (MICRODEV_LINUX_IRQ_MOUSE != 12)
56 # error Inconsistancy in defining the IRQ# for PS/2 Mouse!
59 #if (MICRODEV_LINUX_IRQ_IDE2 != 13)
60 # error Inconsistancy in defining the IRQ# for secondary IDE!
63 #if (MICRODEV_LINUX_IRQ_IDE1 != 14)
64 # error Inconsistancy in defining the IRQ# for primary IDE!
69 unsigned int irq = data->
irq;
74 if (!fpgaIrqTable[irq].
mapped)
77 fpgaIrq = fpgaIrqTable[irq].fpgaIrq;
83 static void enable_microdev_irq(
struct irq_data *data)
85 unsigned int irq = data->
irq;
86 unsigned long priorityReg, priorities,
pri;
91 if (
unlikely(!fpgaIrqTable[irq].mapped))
96 fpgaIrq = fpgaIrqTable[irq].fpgaIrq;
109 static struct irq_chip microdev_irq_type = {
110 .name =
"MicroDev-IRQ",
111 .irq_unmask = enable_microdev_irq,
112 .irq_mask = disable_microdev_irq,
116 static void __init make_microdev_irq(
unsigned int irq)
131 make_microdev_irq(i);
145 printk(
"-------------------------- microdev_print_fpga_intc_status() ------------------\n");
146 printk(
"FPGA_INTENB = 0x%08x\n", *intenb);
147 printk(
"FPGA_INTDSB = 0x%08x\n", *intdsb);
148 printk(
"FPGA_INTSRC = 0x%08x\n", *intsrc);
149 printk(
"FPGA_INTREQ = 0x%08x\n", *intreq);
150 printk(
"FPGA_INTPRI[3..0] = %08x:%08x:%08x:%08x\n", *intprid, *intpric, *intprib, *intpria);
151 printk(
"-------------------------------------------------------------------------------\n");