Commit 48a712c4 authored by Russell King's avatar Russell King

[ARM] Update Integrator IRQ decoding.

This takes account of the other IRQ changes, and makes the interrupt
decoding more efficient.
parent 9972ab81
...@@ -439,20 +439,25 @@ ENTRY(soft_irq_mask) ...@@ -439,20 +439,25 @@ ENTRY(soft_irq_mask)
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
/* FIXME: should not be using soo many LDRs here */ /* FIXME: should not be using soo many LDRs here */
ldr \irqnr, =IO_ADDRESS(INTEGRATOR_IC_BASE) ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE)
ldr \irqstat, [\irqnr, #IRQ_STATUS] @ get masked status mov \irqnr, #IRQ_PIC_START
ldr \irqnr, =IO_ADDRESS(INTEGRATOR_HDR_BASE) ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status
ldr \irqnr, [\irqnr, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)] ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE)
orr \irqstat, \irqstat, \irqnr, lsl #INTEGRATOR_CM_INT0 teq \irqstat, #0
ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)]
moveq \irqnr, #IRQ_CIC_START
mov \irqnr, #0 1001: tst \irqstat, #15
1001: tst \irqstat, #1
bne 1002f bne 1002f
add \irqnr, \irqnr, #4
movs \irqstat, \irqstat, lsr #4
bne 1001b
1002: tst \irqstat, #1
bne 1003f
add \irqnr, \irqnr, #1 add \irqnr, \irqnr, #1
mov \irqstat, \irqstat, lsr #1 movs \irqstat, \irqstat, lsr #1
cmp \irqnr, #22 bne 1002b
bcc 1001b 1003: /* EQ will be set if no irqs pending */
1002: /* EQ will be set if we reach 22 */
.endm .endm
.macro irq_prio_table .macro irq_prio_table
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment