/*
* Copyright 2004 PMC-Sierra Inc.
* Author: Manish Lachwani (lachwani@pmc-sierra.com)
* Adaption for AR7: Enrik Berkhan <enrik@akk.org>
*
* First-level interrupt dispatcher for the TI AR7
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#define __ASSEMBLY__
#include <linux/config.h>
#include <asm/asm.h>
#include <asm/mipsregs.h>
#include <asm/addrspace.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>
/*
* First level interrupt dispatcher for TI AR7 based boards
*/
.align 5
NESTED(ar7IRQ, PT_SIZE, sp)
SAVE_ALL
CLI
.set at
mfc0 t0, CP0_CAUSE
mfc0 t2, CP0_STATUS
and t0, t2
andi t1, t0, STATUSF_IP2 /* hw0 hardware interrupt */
bnez t1, ll_hw0_irq
andi t1, t0, STATUSF_IP7 /* R4k CPU timer */
bnez t1, ll_timer_irq
.set reorder
/* wrong alarm or masked ... */
j spurious_interrupt
nop
END(ar7IRQ)
.align 5
ll_hw0_irq:
li a0, 2
move a1, sp
jal do_IRQ
j ret_from_irq
ll_timer_irq:
li a0, 7
move a1, sp
jal do_IRQ
j ret_from_irq