2 * Copyright 2001 MontaVista Software Inc.
3 * Author: jsun@mvista.com or jsun@junsun.net
5 * First-level interrupt dispatcher for ocelot board.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
13 #include <asm/mipsregs.h>
14 #include <asm/addrspace.h>
15 #include <asm/regdef.h>
16 #include <asm/stackframe.h>
19 * first level interrupt dispatcher for ocelot board -
20 * We check for the timer first, then check PCI ints A and D.
21 * Then check for serial IRQ and fall through.
24 NESTED(ocelot_handle_int, PT_SIZE, sp)
33 andi t1, t0, STATUSF_IP2 /* int0 hardware line */
34 bnez t1, ll_pri_enet_irq
35 andi t1, t0, STATUSF_IP3 /* int1 hardware line */
36 bnez t1, ll_sec_enet_irq
37 andi t1, t0, STATUSF_IP4 /* int2 hardware line */
39 andi t1, t0, STATUSF_IP5 /* int3 hardware line */
41 andi t1, t0, STATUSF_IP6 /* int4 hardware line */
42 bnez t1, ll_galileo_irq
43 andi t1, t0, STATUSF_IP7 /* cpu timer */
44 bnez t1, ll_cputimer_irq
46 /* now look at the extended interrupts */
48 cfc0 t1, CP0_S1_INTCONTROL
50 /* shift the mask 8 bits left to line up the bits */
56 andi t1, t0, STATUSF_IP8 /* int6 hardware line */
58 andi t1, t0, STATUSF_IP9 /* int7 hardware line */
60 andi t1, t0, STATUSF_IP10 /* int8 hardware line */
61 bnez t1, ll_cpci_abcd_irq
62 andi t1, t0, STATUSF_IP11 /* int9 hardware line */
67 /* wrong alarm or masked ... */
70 END(ocelot_handle_int)