2 * Cobalt interrupt handler
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
8 * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
9 * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv)
12 #include <asm/mipsregs.h>
13 #include <asm/cobalt/cobalt.h>
14 #include <asm/regdef.h>
15 #include <asm/stackframe.h>
18 * cobalt_handle_int: Interrupt handler for Cobalt boards
24 NESTED(cobalt_handle_int, PT_SIZE, sp)
30 * Get pending Interrupts
32 mfc0 s0,CP0_CAUSE # get raw irq status
33 mfc0 a0,CP0_STATUS # get irq mask
34 and s0,s0,a0 # compute masked irq status
36 andi a0,s0,CAUSEF_IP2 /* Check for Galileo timer */
38 andi a0,s0,CAUSEF_IP6 /* Check for Via chip */
40 /* Galileo interrupt */
47 beq a0,zero,1f /* Check IP6 */
57 beq a0,zero,1f /* Check IP3 */
60 /* Ethernet 0 interrupt */
69 beq a0,zero,1f /* Check IP4 */
72 /* Ethernet 1 interrupt */
80 beq a0,zero,1f /* Check IP5 */
83 /* Serial interrupt */
84 li a0,COBALT_SERIAL_IRQ
91 beq a0,zero,1f /* Check IP7 */
95 li a0,COBALT_QUBE_SLOT_IRQ
103 END(cobalt_handle_int)