From 67dfb153a352e57e71404d550be7eb60d15d7f2d Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Tue, 1 May 2007 22:32:56 +0200 Subject: m68k: Mac IRQ prep Make sure that there are no slot IRQs asserted before leaving the nubus handler. If there are and we don't then the nubus gets wedged because this prevents a CA1 transition, which means no more nubus IRQs. Make the interrupt dispatch loops terminate sooner. Explicitly initialise the VIA latches to make the code more easily understood. Also some cleanups. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- arch/m68k/mac/baboon.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'arch/m68k/mac/baboon.c') diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 303a3b56c51c..8ea7498cec37 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c @@ -66,7 +66,7 @@ void __init baboon_register_interrupts(void) irqreturn_t baboon_irq(int irq, void *dev_id) { - int irq_bit,i; + int irq_bit, irq_num; unsigned char events; #ifdef DEBUG_IRQS @@ -78,14 +78,18 @@ irqreturn_t baboon_irq(int irq, void *dev_id) if (!(events = baboon->mb_ifr & 0x07)) return IRQ_NONE; - for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) { + irq_num = IRQ_BABOON_0; + irq_bit = 1; + do { if (events & irq_bit/* & baboon_active*/) { baboon_active &= ~irq_bit; baboon->mb_ifr &= ~irq_bit; - m68k_handle_int(IRQ_BABOON_0 + i); + m68k_handle_int(irq_num); baboon_active |= irq_bit; } - } + irq_bit <<= 1; + irq_num++; + } while(events >= irq_bit); #if 0 if (baboon->mb_ifr & 0x02) macide_ack_intr(NULL); /* for now we need to smash all interrupts */ -- cgit v1.2.3