2 * Copyright 2001 MontaVista Software Inc.
3 * Author: jsun@mvista.com or jsun@junsun.net
5 * First-level interrupt dispatcher for ddb5476
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>
18 #include <asm/ddb5xxx/ddb5476.h>
21 * first level interrupt dispatcher for ocelot board -
22 * We check for the timer first, then check PCI ints A and D.
23 * Then check for serial IRQ and fall through.
26 NESTED(ddb5476_handle_int, PT_SIZE, sp)
36 andi t1, t0, STATUSF_IP7 /* cpu timer */
38 andi t1, t0, STATUSF_IP2 /* vrc5476 & i8259 */
40 andi t1, t0, STATUSF_IP3
42 andi t1, t0, STATUSF_IP4
44 andi t1, t0, STATUSF_IP5
46 andi t1, t0, STATUSF_IP6
48 andi t1, t0, STATUSF_IP0 /* software int 0 */
50 andi t1, t0, STATUSF_IP1 /* software int 1 */
56 /* wrong alarm or masked ... */
57 // j spurious_interrupt
59 jal vrc5476_irq_dispatch
66 li a0, CPU_IRQ_BASE + 0
72 li a0, CPU_IRQ_BASE + 1
77 ll_cpu_ip2: /* jump to second-level dispatching */
79 jal vrc5476_irq_dispatch
83 li a0, CPU_IRQ_BASE + 3
89 li a0, CPU_IRQ_BASE + 4
95 li a0, CPU_IRQ_BASE + 5
101 li a0, CPU_IRQ_BASE + 6
107 li a0, CPU_IRQ_BASE + 7
112 END(ddb5476_handle_int)