diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-01-19 12:56:50 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-01-19 12:56:50 -0800 |
commit | 282f445a779ed76fca9884fe377bf56a3088b208 (patch) | |
tree | d9abcf526baee0100672851e0a8894c19e762a39 /arch/m68k/mac/baboon.c | |
parent | 68f30fbee19cc67849b9fa8e153ede70758afe81 (diff) | |
parent | 90a4c0f51e8e44111a926be6f4c87af3938a79c3 (diff) |
Merge remote-tracking branch 'linus/master' into x86/urgent
Diffstat (limited to 'arch/m68k/mac/baboon.c')
-rw-r--r-- | arch/m68k/mac/baboon.c | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index b403924a1ca..3fe0e43d44f 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c @@ -8,13 +8,8 @@ #include <linux/types.h> #include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/delay.h> -#include <linux/init.h> #include <linux/irq.h> -#include <asm/traps.h> -#include <asm/bootinfo.h> #include <asm/macintosh.h> #include <asm/macints.h> #include <asm/mac_baboon.h> @@ -23,7 +18,6 @@ int baboon_present; static volatile struct baboon *baboon; -static unsigned char baboon_disabled; #if 0 extern int macide_ack_intr(struct ata_channel *); @@ -89,51 +83,32 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc) void __init baboon_register_interrupts(void) { - baboon_disabled = 0; irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); } /* - * The means for masking individual baboon interrupts remains a mystery, so - * enable the umbrella interrupt only when no baboon interrupt is disabled. + * The means for masking individual Baboon interrupts remains a mystery. + * However, since we only use the IDE IRQ, we can just enable/disable all + * Baboon interrupts. If/when we handle more than one Baboon IRQ, we must + * either figure out how to mask them individually or else implement the + * same workaround that's used for NuBus slots (see nubus_disabled and + * via_nubus_irq_shutdown). */ void baboon_irq_enable(int irq) { - int irq_idx = IRQ_IDX(irq); - #ifdef DEBUG_IRQUSE printk("baboon_irq_enable(%d)\n", irq); #endif - baboon_disabled &= ~(1 << irq_idx); - if (!baboon_disabled) - mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C)); + mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C)); } void baboon_irq_disable(int irq) { - int irq_idx = IRQ_IDX(irq); - #ifdef DEBUG_IRQUSE printk("baboon_irq_disable(%d)\n", irq); #endif - baboon_disabled |= 1 << irq_idx; - if (baboon_disabled) - mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C)); -} - -void baboon_irq_clear(int irq) -{ - int irq_idx = IRQ_IDX(irq); - - baboon->mb_ifr &= ~(1 << irq_idx); -} - -int baboon_irq_pending(int irq) -{ - int irq_idx = IRQ_IDX(irq); - - return baboon->mb_ifr & (1 << irq_idx); + mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C)); } |