[MIPS] Fix the crime against humanity that mipsIRQ.S is.
[firewire-audio.git] / arch / mips / galileo-boards / ev96100 / int-handler.S
blob0edf1fec2905f92173bcb9ee1dfcecee0072d49a
1 #include <asm/asm.h>
2 #include <asm/mipsregs.h>
3 #include <asm/regdef.h>
4 #include <asm/stackframe.h>
6         .set    noat
7         .align  5
9 NESTED(ev96100IRQ, PT_SIZE, sp)
10         SAVE_ALL
11         CLI                             # Important: mark KERNEL mode !
13         mfc0    t0, CP0_CAUSE           # get pending interrupts
14         mfc0    t1, CP0_STATUS          # get enabled interrupts
15         and     t0, t1                  # isolate allowed ones
17         # FIX ME add R7000 extensions
18         andi    t0,0xff00               # isolate pending bits
19         andi    a0, t0, CAUSEF_IP7
20         beq     a0, zero, 1f
21         move    a0, sp
22         jal     mips_timer_interrupt
23         j       ret_from_irq
25 1:      beqz    t0, 3f                  # spurious interrupt
27         move    a0, t0
28         move    a1, sp
29         jal     ev96100_cpu_irq
30         j       ret_from_irq
32 3:      jal     spurious_interrupt
33         j       ret_from_irq
34         END(ev96100IRQ)