2 * Copyright 2002 Momentum Computer Inc.
3 * Author: Matthew Dharm <mdharm@momenco.com>
5 * Copyright 2001 MontaVista Software Inc.
6 * Author: jsun@mvista.com or jsun@junsun.net
8 * First-level interrupt dispatcher for Ocelot-CS board.
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
16 #include <asm/mipsregs.h>
17 #include <asm/addrspace.h>
18 #include <asm/regdef.h>
19 #include <asm/stackframe.h>
20 #include "ocelot_c_fpga.h"
23 * First level interrupt dispatcher for Ocelot-CS board
26 NESTED(ocelot_handle_int, PT_SIZE, sp)
35 andi t1, t0, STATUSF_IP0 /* sw0 software interrupt */
37 andi t1, t0, STATUSF_IP1 /* sw1 software interrupt */
39 andi t1, t0, STATUSF_IP2 /* int0 hardware line */
41 andi t1, t0, STATUSF_IP3 /* int1 hardware line */
42 bnez t1, ll_uart_decode_irq
43 andi t1, t0, STATUSF_IP4 /* int2 hardware line */
45 andi t1, t0, STATUSF_IP5 /* int3 hardware line */
46 bnez t1, ll_cpci_decode_irq
47 andi t1, t0, STATUSF_IP6 /* int4 hardware line */
48 bnez t1, ll_mv64340_decode_irq
49 andi t1, t0, STATUSF_IP7 /* cpu timer */
50 bnez t1, ll_cputimer_irq
54 /* wrong alarm or masked ... */
57 END(ocelot_handle_int)
92 ll_mv64340_decode_irq: