122b1d707SAtsushi Nemoto /*
222b1d707SAtsushi Nemoto  * linux/arch/mips/tx4938/common/irq.c
322b1d707SAtsushi Nemoto  *
422b1d707SAtsushi Nemoto  * Common tx4938 irq handler
522b1d707SAtsushi Nemoto  * Copyright (C) 2000-2001 Toshiba Corporation
622b1d707SAtsushi Nemoto  *
722b1d707SAtsushi Nemoto  * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the
822b1d707SAtsushi Nemoto  * terms of the GNU General Public License version 2. This program is
922b1d707SAtsushi Nemoto  * licensed "as is" without any warranty of any kind, whether express
1022b1d707SAtsushi Nemoto  * or implied.
1122b1d707SAtsushi Nemoto  *
1222b1d707SAtsushi Nemoto  * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
1322b1d707SAtsushi Nemoto  */
1422b1d707SAtsushi Nemoto #include <linux/init.h>
1522b1d707SAtsushi Nemoto #include <linux/interrupt.h>
16ca4d3e67SDavid Howells #include <linux/irq.h>
1722b1d707SAtsushi Nemoto #include <asm/irq_cpu.h>
18edcaf1a6SAtsushi Nemoto #include <asm/txx9/tx4938.h>
1922b1d707SAtsushi Nemoto 
tx4938_irq_init(void)20edcaf1a6SAtsushi Nemoto void __init tx4938_irq_init(void)
2122b1d707SAtsushi Nemoto {
2274894363SAtsushi Nemoto 	int i;
2374894363SAtsushi Nemoto 
2422b1d707SAtsushi Nemoto 	mips_cpu_irq_init();
2594a4c329SAtsushi Nemoto 	txx9_irq_init(TX4938_IRC_REG & 0xfffffffffULL);
26e4ec7989SThomas Gleixner 	irq_set_chained_handler(MIPS_CPU_IRQ_BASE + TX4938_IRC_INT,
27edcaf1a6SAtsushi Nemoto 				handle_simple_irq);
2874894363SAtsushi Nemoto 	/* raise priority for errors, timers, SIO */
2974894363SAtsushi Nemoto 	txx9_irq_set_pri(TX4938_IR_ECCERR, 7);
3074894363SAtsushi Nemoto 	txx9_irq_set_pri(TX4938_IR_WTOERR, 7);
3174894363SAtsushi Nemoto 	txx9_irq_set_pri(TX4938_IR_PCIERR, 7);
3274894363SAtsushi Nemoto 	txx9_irq_set_pri(TX4938_IR_PCIPME, 7);
3374894363SAtsushi Nemoto 	for (i = 0; i < TX4938_NUM_IR_TMR; i++)
3474894363SAtsushi Nemoto 		txx9_irq_set_pri(TX4938_IR_TMR(i), 6);
3574894363SAtsushi Nemoto 	for (i = 0; i < TX4938_NUM_IR_SIO; i++)
3674894363SAtsushi Nemoto 		txx9_irq_set_pri(TX4938_IR_SIO(i), 5);
3722b1d707SAtsushi Nemoto }
38