Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 1 | /* |
| 2 | * include/asm-arm/arch-ixp23xx/entry-macro.S |
| 3 | */ |
| 4 | |
| 5 | .macro disable_fiq |
| 6 | .endm |
| 7 | |
Dan Williams | f80dff9 | 2007-02-16 22:16:32 +0100 | [diff] [blame] | 8 | .macro get_irqnr_preamble, base, tmp |
| 9 | .endm |
| 10 | |
| 11 | .macro arch_ret_to_user, tmp1, tmp2 |
| 12 | .endm |
| 13 | |
Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
| 15 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) |
| 16 | ldr \irqnr, [\irqnr] @ get interrupt number |
Lennert Buytenhek | e6fea6a5 | 2006-06-20 19:26:41 +0100 | [diff] [blame] | 17 | cmp \irqnr, #0x0 @ spurious interrupt ? |
Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 18 | movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits |
| 19 | subne \irqnr, \irqnr, #1 @ convert to 0 based |
| 20 | |
| 21 | #if 0 |
| 22 | cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH |
| 23 | bne 1001f |
| 24 | mov \irqnr, #IRQ_IXP23XX_INTA |
| 25 | |
| 26 | ldr \irqnr, =0xf5000030 |
| 27 | |
| 28 | mov \tmp, #(1<<26) |
| 29 | tst \irqnr, \tmp |
| 30 | movne \irqnr, #IRQ_IXP23XX_INTB |
| 31 | |
| 32 | mov \tmp, #(1<<27) |
| 33 | tst \irqnr, \tmp |
| 34 | movne \irqnr, #IRQ_IXP23XX_INTA |
| 35 | 1001: |
| 36 | #endif |
| 37 | .endm |