| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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> | 
| Atsushi Nemoto | 2fa7937 | 2007-01-14 23:41:42 +0900 | [diff] [blame] | 24 | #include <asm/i8259.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | #include <asm/vr41xx/cmbvr4133.h> | 
|  | 26 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | extern int vr4133_rockhopper; | 
|  | 28 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | static int i8259_get_irq_number(int irq) | 
|  | 30 | { | 
| Atsushi Nemoto | 2fa7937 | 2007-01-14 23:41:42 +0900 | [diff] [blame] | 31 | return i8259_irq(); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | } | 
|  | 33 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | } |