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 * Copyright 2004 PMC-Sierra
9 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
11 * Copyright (C) 2004 MontaVista Software Inc.
12 * Author: Manish Lachwani, mlachwani@mvista.com
14 * First-level interrupt dispatcher for Ocelot-3 board.
16 * This program is free software; you can redistribute it and/or modify it
17 * under the terms of the GNU General Public License as published by the
18 * Free Software Foundation; either version 2 of the License, or (at your
19 * option) any later version.
22 #include <asm/mipsregs.h>
23 #include <asm/addrspace.h>
24 #include <asm/regdef.h>
25 #include <asm/stackframe.h>
28 * First level interrupt dispatcher for Ocelot-3 board
31 NESTED(ocelot3_handle_int, PT_SIZE, sp)
41 andi t1, t0, STATUSF_IP0 /* sw0 software interrupt (IRQ0) */
44 andi t1, t0, STATUSF_IP1 /* sw1 software interrupt (IRQ1) */
47 andi t1, t0, STATUSF_IP2 /* int0 hardware line (IRQ2) */
48 bnez t1, ll_pci0slot1_irq
50 andi t1, t0, STATUSF_IP3 /* int1 hardware line (IRQ3) */
51 bnez t1, ll_pci0slot2_irq
53 andi t1, t0, STATUSF_IP4 /* int2 hardware line (IRQ4) */
54 bnez t1, ll_pci1slot1_irq
56 andi t1, t0, STATUSF_IP5 /* int3 hardware line (IRQ5) */
57 bnez t1, ll_pci1slot2_irq
59 andi t1, t0, STATUSF_IP6 /* int4 hardware line (IRQ6) */
62 andi t1, t0, STATUSF_IP7 /* cpu timer (IRQ7) */
63 bnez t1, ll_cputimer_irq
65 /* now look at extended interrupts */
67 cfc0 t1, CP0_S1_INTCONTROL
69 /* shift the mask 8 bits left to line up the bits */
75 andi t1, t0, STATUSF_IP8 /* int6 hardware line (IRQ9) */
76 bnez t1, ll_mv64340_decode_irq
80 /* wrong alarm or masked ... */
83 END(ocelot3_handle_int)
133 ll_mv64340_decode_irq: