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/interrupt.h>
16 #include <linux/init.h>
19 #include <asm/mach/irq.h>
21 extern unsigned int anakin_irq_mask
, anakin_active_irqs
;
22 extern void do_IRQ(int, struct pt_regs
*);
25 anakin_mask_irq(unsigned int irq
)
27 anakin_irq_mask
&= ~(1 << irq
);
31 anakin_unmask_irq(unsigned int irq
)
33 anakin_irq_mask
|= (1 << irq
);
37 * This is a faked interrupt to deal with parallel interrupt requests
38 * on the Anakin. Make sure that its interrupt number is not in any
39 * way conflicting with the hardware interrupt numbers! Check
40 * IRQ_ANAKIN in linux/include/asm-arm/arch-anakin/irqs.h.
43 anakin_interrupt(int irq
, void *dev_id
, struct pt_regs
*regs
)
45 for (irq
= 0; irq
< NR_IRQS
; irq
++)
46 if (anakin_active_irqs
& (1 << irq
))
50 static struct irqaction anakin_irq
= {
52 .handler
= anakin_interrupt
,
61 for (irq
= 0; irq
< NR_IRQS
; irq
++) {
73 case IRQ_COMPACTFLASH
:
76 irq_desc
[irq
].valid
= 1;
77 irq_desc
[irq
].mask_ack
= anakin_mask_irq
;
78 irq_desc
[irq
].mask
= anakin_mask_irq
;
79 irq_desc
[irq
].unmask
= anakin_unmask_irq
;
82 setup_arm_irq(IRQ_ANAKIN
, &anakin_irq
);