2 * Copyright 2001 MontaVista Software Inc.
3 * Author: jsun@mvista.com or jsun@junsun.net
5 * First-level interrupt dispatcher for ddb5477
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>
17 #include <asm/ddb5xxx/ddb5477.h>
20 * first level interrupt dispatcher for ocelot board -
21 * We check for the timer first, then check PCI ints A and D.
22 * Then check for serial IRQ and fall through.
25 NESTED(ddb5477_handle_int, PT_SIZE, sp)
35 andi t1, t0, STATUSF_IP7 /* cpu timer */
36 bnez t1, ll_cputimer_irq
37 andi t1, t0, (STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP4 | STATUSF_IP5 | STATUSF_IP6 )
38 bnez t1, ll_vrc5477_irq
39 andi t1, t0, STATUSF_IP0 /* software int 0 */
41 andi t1, t0, STATUSF_IP1 /* software int 1 */
46 /* wrong alarm or masked ... */
49 END(ddb5477_handle_int)
55 jal vrc5477_irq_dispatch
59 li a0, CPU_IRQ_BASE + 7
66 li a0, CPU_IRQ_BASE + 0
72 li a0, CPU_IRQ_BASE + 1