Ralf Baechle | 23fbee9 | 2005-07-25 22:45:45 +0000 | [diff] [blame] | 1 | /* |
Uwe Zeisberger | f30c226 | 2006-10-03 23:01:26 +0200 | [diff] [blame] | 2 | * linux/arch/mips/tx4938/common/irq.c |
Ralf Baechle | 23fbee9 | 2005-07-25 22:45:45 +0000 | [diff] [blame] | 3 | * |
| 4 | * Common tx4938 irq handler |
| 5 | * Copyright (C) 2000-2001 Toshiba Corporation |
| 6 | * |
| 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 |
| 10 | * or implied. |
| 11 | * |
| 12 | * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) |
| 13 | */ |
Ralf Baechle | 23fbee9 | 2005-07-25 22:45:45 +0000 | [diff] [blame] | 14 | #include <linux/init.h> |
Ralf Baechle | 23fbee9 | 2005-07-25 22:45:45 +0000 | [diff] [blame] | 15 | #include <linux/interrupt.h> |
Atsushi Nemoto | c87abd7 | 2007-08-02 23:36:02 +0900 | [diff] [blame] | 16 | #include <asm/irq_cpu.h> |
Atsushi Nemoto | edcaf1a | 2008-07-11 23:27:54 +0900 | [diff] [blame] | 17 | #include <asm/txx9/tx4938.h> |
Ralf Baechle | 23fbee9 | 2005-07-25 22:45:45 +0000 | [diff] [blame] | 18 | |
Atsushi Nemoto | edcaf1a | 2008-07-11 23:27:54 +0900 | [diff] [blame] | 19 | void __init tx4938_irq_init(void) |
Ralf Baechle | 23fbee9 | 2005-07-25 22:45:45 +0000 | [diff] [blame] | 20 | { |
Atsushi Nemoto | 7489436 | 2008-08-19 22:55:12 +0900 | [diff] [blame] | 21 | int i; |
| 22 | |
Atsushi Nemoto | c87abd7 | 2007-08-02 23:36:02 +0900 | [diff] [blame] | 23 | mips_cpu_irq_init(); |
Atsushi Nemoto | 94a4c32 | 2008-07-19 01:51:47 +0900 | [diff] [blame] | 24 | txx9_irq_init(TX4938_IRC_REG & 0xfffffffffULL); |
Atsushi Nemoto | edcaf1a | 2008-07-11 23:27:54 +0900 | [diff] [blame] | 25 | set_irq_chained_handler(MIPS_CPU_IRQ_BASE + TX4938_IRC_INT, |
| 26 | handle_simple_irq); |
Atsushi Nemoto | 7489436 | 2008-08-19 22:55:12 +0900 | [diff] [blame] | 27 | /* raise priority for errors, timers, SIO */ |
| 28 | txx9_irq_set_pri(TX4938_IR_ECCERR, 7); |
| 29 | txx9_irq_set_pri(TX4938_IR_WTOERR, 7); |
| 30 | txx9_irq_set_pri(TX4938_IR_PCIERR, 7); |
| 31 | txx9_irq_set_pri(TX4938_IR_PCIPME, 7); |
| 32 | for (i = 0; i < TX4938_NUM_IR_TMR; i++) |
| 33 | txx9_irq_set_pri(TX4938_IR_TMR(i), 6); |
| 34 | for (i = 0; i < TX4938_NUM_IR_SIO; i++) |
| 35 | txx9_irq_set_pri(TX4938_IR_SIO(i), 5); |
Ralf Baechle | e4ac58a | 2006-04-03 17:56:36 +0100 | [diff] [blame] | 36 | } |