2 * linux/arch/arm/mach-anakin/irq.c
4 * Copyright (C) 2001 Aleph One Ltd. for Acunia N.V.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 * 10-Apr-2001 TTC Created
14 #include <linux/ptrace.h>
15 #include <linux/sched.h>
16 #include <linux/interrupt.h>
17 #include <linux/init.h>
18 #include <linux/list.h>
19 #include <linux/timer.h>
22 #include <asm/mach/irq.h>
24 extern unsigned int anakin_irq_mask, anakin_active_irqs;
25 extern void do_IRQ(int, struct pt_regs *);
28 anakin_mask_irq(unsigned int irq)
30 anakin_irq_mask &= ~(1 << irq);
34 anakin_unmask_irq(unsigned int irq)
36 anakin_irq_mask |= (1 << irq);
40 * This is a faked interrupt to deal with parallel interrupt requests
41 * on the Anakin. Make sure that its interrupt number is not in any
42 * way conflicting with the hardware interrupt numbers! Check
43 * IRQ_ANAKIN in linux/include/asm-arm/arch-anakin/irqs.h.
46 anakin_interrupt(int irq, void *dev_id, struct pt_regs *regs)
48 for (irq = 0; irq < NR_IRQS; irq++)
49 if (anakin_active_irqs & (1 << irq))
53 static struct irqaction anakin_irq = {
55 .handler = anakin_interrupt,
56 .flags = SA_INTERRUPT,
64 for (irq = 0; irq < NR_IRQS; irq++) {
76 case IRQ_COMPACTFLASH:
79 irq_desc[irq].valid = 1;
80 irq_desc[irq].mask_ack = anakin_mask_irq;
81 irq_desc[irq].mask = anakin_mask_irq;
82 irq_desc[irq].unmask = anakin_unmask_irq;
85 setup_arm_irq(IRQ_ANAKIN, &anakin_irq);