2 * linux/arch/mips/tx4927/common/tx4927_irq_handler.S
4 * Primary interrupt handler for tx4927 based systems
6 * Author: MontaVista Software, Inc.
7 * Author: jsun@mvista.com or jsun@junsun.net
10 * Copyright 2001-2002 MontaVista Software Inc.
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
23 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
26 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA.
33 #include <asm/mipsregs.h>
34 #include <asm/addrspace.h>
35 #include <asm/regdef.h>
36 #include <asm/stackframe.h>
37 #include <asm/tx4927/tx4927.h>
40 NESTED(tx4927_irq_handler, PT_SIZE, sp)
49 andi t1, t0, STATUSF_IP7 /* cpu timer */
52 /* IP6..IP3 multiplexed -- do not use */
54 andi t1, t0, STATUSF_IP2 /* tx4927 pic */
57 andi t1, t0, STATUSF_IP0 /* user line 0 */
60 andi t1, t0, STATUSF_IP1 /* user line 1 */
65 /* wrong alarm or masked ... */
68 END(tx4927_irq_handler)
74 li a0, TX4927_IRQ_CPU_TIMER
82 beqz v0, goto_spurious_interrupt
89 goto_spurious_interrupt:
94 li a0, TX4927_IRQ_USER1
100 li a0, TX4927_IRQ_USER0