Blackfin arch: If we double fault, rather than hang forever, reset
[pandora-kernel.git] / arch / mips / vr41xx / nec-cmbvr4133 / irq.c
1 /*
2  * arch/mips/vr41xx/nec-cmbvr4133/irq.c
3  *
4  * Interrupt routines for the NEC CMB-VR4133 board.
5  *
6  * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> and
7  *         Alex Sapkov <asapkov@ru.mvista.com>
8  *
9  * 2003-2004 (c) MontaVista, Software, Inc. This file is licensed under
10  * the terms of the GNU General Public License version 2. This program
11  * is licensed "as is" without any warranty of any kind, whether express
12  * or implied.
13  *
14  * Support for NEC-CMBVR4133 in 2.6
15  * Manish Lachwani (mlachwani@mvista.com)
16  */
17 #include <linux/bitops.h>
18 #include <linux/errno.h>
19 #include <linux/init.h>
20 #include <linux/ioport.h>
21 #include <linux/interrupt.h>
22
23 #include <asm/io.h>
24 #include <asm/i8259.h>
25 #include <asm/vr41xx/cmbvr4133.h>
26
27 extern int vr4133_rockhopper;
28
29 static int i8259_get_irq_number(int irq)
30 {
31         return i8259_irq();
32 }
33
34 void __init rockhopper_init_irq(void)
35 {
36         int i;
37
38         if(!vr4133_rockhopper) {
39                 printk(KERN_ERR "Not a Rockhopper Board \n");
40                 return;
41         }
42
43         vr41xx_set_irq_trigger(CMBVR41XX_INTC_PIN, TRIGGER_LEVEL, SIGNAL_THROUGH);
44         vr41xx_set_irq_level(CMBVR41XX_INTC_PIN, LEVEL_HIGH);
45         vr41xx_cascade_irq(CMBVR41XX_INTC_IRQ, i8259_get_irq_number);
46 }