Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36594
b: refs/heads/master
c: 7412b10
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and Russell King committed Sep 25, 2006
1 parent 3b87df1 commit c2e62aa
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7d214e974b94e8332d1f6c16f6f19b661dfa855
refs/heads/master: 7412b10f7967ef4210ed6f793004d23642dc5140
16 changes: 16 additions & 0 deletions trunk/arch/arm/mach-iop33x/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ static inline void intstr_write1(u32 val)
iop3xx_cp6_disable();
}

static inline void intbase_write(u32 val)
{
iop3xx_cp6_enable();
asm volatile("mcr p6, 0, %0, c12, c0, 0" : : "r" (val));
iop3xx_cp6_disable();
}

static inline void intsize_write(u32 val)
{
iop3xx_cp6_enable();
asm volatile("mcr p6, 0, %0, c13, c0, 0" : : "r" (val));
iop3xx_cp6_disable();
}

static void
iop331_irq_mask1 (unsigned int irq)
{
Expand Down Expand Up @@ -107,6 +121,8 @@ void __init iop331_init_irq(void)
intctl_write1(0);
intstr_write0(0); // treat all as IRQ
intstr_write1(0);
intbase_write(0);
intsize_write(1);
if(machine_is_iq80331()) // all interrupts are inputs to chip
*IOP3XX_PCIIRSR = 0x0f;

Expand Down
10 changes: 3 additions & 7 deletions trunk/include/asm-arm/arch-iop32x/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@
* Note: only deal with normal interrupts, not FIQ
*/
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
mov \irqnr, #0
ldr \base, =IOP3XX_REG_ADDR(0x07D8)
ldr \irqstat, [\base] @ Read IINTSRC
cmp \irqstat, #0
beq 1001f
clz \irqnr, \irqstat
mov \base, #31
subs \irqnr,\base,\irqnr
1001:
cmp \irqstat, #0
clzne \irqnr, \irqstat
rsbne \irqnr, \irqnr, #31
.endm
22 changes: 5 additions & 17 deletions trunk/include/asm-arm/arch-iop33x/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,11 @@
.macro disable_fiq
.endm

/*
* Note: only deal with normal interrupts, not FIQ
*/
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
mov \irqnr, #0
ldr \base, =IOP3XX_REG_ADDR(0x7A0)
ldr \irqstat, [\base] @ Read IINTSRC0
cmp \irqstat, #0
bne 1002f
ldr \irqstat, [\base, #4] @ Read IINTSRC1
ldr \base, =IOP3XX_REG_ADDR(0x07C8)
ldr \irqstat, [\base] @ Read IINTVEC
cmp \irqstat, #0
beq 1001f
clz \irqnr, \irqstat
rsbs \irqnr,\irqnr,#31 @ recommend by RMK
add \irqnr,\irqnr,#IRQ_IOP331_XINT8
b 1001f
1002: clz \irqnr, \irqstat
rsbs \irqnr,\irqnr,#31 @ recommend by RMK
1001:
ldreq \irqstat, [\base] @ erratum 63 workaround
adds \irqnr, \irqstat, #1
movne \irqnr, \irqstat, lsr #2
.endm

0 comments on commit c2e62aa

Please sign in to comment.