25 #include <linux/module.h>
27 #include <linux/device.h>
32 #include <mach/hardware.h>
37 #include <mach/regs-irq.h>
44 #include <asm/debug-ll.h>
56 static unsigned char bast_pc104_irqmasks[] = {
75 static unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 };
83 temp &= ~bast_pc104_irqmasks[data->
irq];
92 bast_pc104_mask(data);
97 bast_pc104_unmask(
struct irq_data *data)
102 temp |= bast_pc104_irqmasks[data->
irq];
106 static struct irq_chip bast_pc104_chip = {
107 .irq_mask = bast_pc104_mask,
108 .irq_unmask = bast_pc104_unmask,
109 .irq_ack = bast_pc104_maskack
113 bast_irq_pc104_demux(
unsigned int irq,
130 for (i = 0; stat != 0; i++, stat >>= 1) {
132 irqno = bast_pc104_irqs[
i];
139 static __init int bast_irq_init(
void)
143 if (machine_is_bast()) {
144 printk(
KERN_INFO "BAST PC104 IRQ routing, Copyright 2005 Simtec Electronics\n");
150 irq_set_chained_handler(IRQ_ISA, bast_irq_pc104_demux);
154 for (i = 0; i < 4; i++) {
155 unsigned int irqno = bast_pc104_irqs[
i];
157 irq_set_chip_and_handler(irqno, &bast_pc104_chip,