18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * linux/arch/mips/tx4938/common/irq.c 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Common tx4938 irq handler 58c2ecf20Sopenharmony_ci * Copyright (C) 2000-2001 Toshiba Corporation 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the 88c2ecf20Sopenharmony_ci * terms of the GNU General Public License version 2. This program is 98c2ecf20Sopenharmony_ci * licensed "as is" without any warranty of any kind, whether express 108c2ecf20Sopenharmony_ci * or implied. 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci#include <linux/init.h> 158c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 168c2ecf20Sopenharmony_ci#include <linux/irq.h> 178c2ecf20Sopenharmony_ci#include <asm/irq_cpu.h> 188c2ecf20Sopenharmony_ci#include <asm/txx9/tx4938.h> 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_civoid __init tx4938_irq_init(void) 218c2ecf20Sopenharmony_ci{ 228c2ecf20Sopenharmony_ci int i; 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci mips_cpu_irq_init(); 258c2ecf20Sopenharmony_ci txx9_irq_init(TX4938_IRC_REG & 0xfffffffffULL); 268c2ecf20Sopenharmony_ci irq_set_chained_handler(MIPS_CPU_IRQ_BASE + TX4938_IRC_INT, 278c2ecf20Sopenharmony_ci handle_simple_irq); 288c2ecf20Sopenharmony_ci /* raise priority for errors, timers, SIO */ 298c2ecf20Sopenharmony_ci txx9_irq_set_pri(TX4938_IR_ECCERR, 7); 308c2ecf20Sopenharmony_ci txx9_irq_set_pri(TX4938_IR_WTOERR, 7); 318c2ecf20Sopenharmony_ci txx9_irq_set_pri(TX4938_IR_PCIERR, 7); 328c2ecf20Sopenharmony_ci txx9_irq_set_pri(TX4938_IR_PCIPME, 7); 338c2ecf20Sopenharmony_ci for (i = 0; i < TX4938_NUM_IR_TMR; i++) 348c2ecf20Sopenharmony_ci txx9_irq_set_pri(TX4938_IR_TMR(i), 6); 358c2ecf20Sopenharmony_ci for (i = 0; i < TX4938_NUM_IR_SIO; i++) 368c2ecf20Sopenharmony_ci txx9_irq_set_pri(TX4938_IR_SIO(i), 5); 378c2ecf20Sopenharmony_ci} 38