2 * linux/arch/mips/tx4938/common/irq.c
4 * Common tx4938 irq handler
5 * Copyright (C) 2000-2001 Toshiba Corporation
7 * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
8 * terms of the GNU General Public License version 2. This program is
9 * licensed "as is" without any warranty of any kind, whether express
12 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
14 #include <linux/init.h>
15 #include <linux/interrupt.h>
16 #include <asm/irq_cpu.h>
17 #include <asm/mipsregs.h>
18 #include <asm/tx4938/rbtx4938.h>
24 txx9_irq_init(TX4938_IRC_REG
);
25 set_irq_chained_handler(TX4938_IRQ_NEST_PIC_ON_CP0
, handle_simple_irq
);
28 int toshiba_rbtx4938_irq_nested(int irq
);
30 asmlinkage
void plat_irq_dispatch(void)
32 unsigned int pending
= read_c0_cause() & read_c0_status();
34 if (pending
& STATUSF_IP7
)
35 do_IRQ(TX4938_IRQ_CPU_TIMER
);
36 else if (pending
& STATUSF_IP2
) {
38 if (irq
== TX4938_IRQ_PIC_BEG
+ TX4938_IR_INT(0))
39 irq
= toshiba_rbtx4938_irq_nested(irq
);
44 } else if (pending
& STATUSF_IP1
)
45 do_IRQ(TX4938_IRQ_USER1
);
46 else if (pending
& STATUSF_IP0
)
47 do_IRQ(TX4938_IRQ_USER0
);