blob: 7d2d076b0f54f55e2ae5e77817ef0b77a62f6325 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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>
Atsushi Nemoto2fa79372007-01-14 23:41:42 +090024#include <asm/i8259.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070025#include <asm/vr41xx/cmbvr4133.h>
26
Linus Torvalds1da177e2005-04-16 15:20:36 -070027extern int vr4133_rockhopper;
28
Linus Torvalds1da177e2005-04-16 15:20:36 -070029static int i8259_get_irq_number(int irq)
30{
Atsushi Nemoto2fa79372007-01-14 23:41:42 +090031 return i8259_irq();
Linus Torvalds1da177e2005-04-16 15:20:36 -070032}
33
Linus Torvalds1da177e2005-04-16 15:20:36 -070034void __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
Linus Torvalds1da177e2005-04-16 15:20:36 -070043 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}