diff options
| -rw-r--r-- | arch/m68k/mac/baboon.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 74999685ddad..3fe0e43d44f6 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | 18 | ||
| 19 | int baboon_present; | 19 | int baboon_present; |
| 20 | static volatile struct baboon *baboon; | 20 | static volatile struct baboon *baboon; |
| 21 | static unsigned char baboon_disabled; | ||
| 22 | 21 | ||
| 23 | #if 0 | 22 | #if 0 |
| 24 | extern int macide_ack_intr(struct ata_channel *); | 23 | extern int macide_ack_intr(struct ata_channel *); |
| @@ -84,37 +83,32 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc) | |||
| 84 | 83 | ||
| 85 | void __init baboon_register_interrupts(void) | 84 | void __init baboon_register_interrupts(void) |
| 86 | { | 85 | { |
| 87 | baboon_disabled = 0; | ||
| 88 | irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); | 86 | irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); |
| 89 | } | 87 | } |
| 90 | 88 | ||
| 91 | /* | 89 | /* |
| 92 | * The means for masking individual baboon interrupts remains a mystery, so | 90 | * The means for masking individual Baboon interrupts remains a mystery. |
| 93 | * enable the umbrella interrupt only when no baboon interrupt is disabled. | 91 | * However, since we only use the IDE IRQ, we can just enable/disable all |
| 92 | * Baboon interrupts. If/when we handle more than one Baboon IRQ, we must | ||
| 93 | * either figure out how to mask them individually or else implement the | ||
| 94 | * same workaround that's used for NuBus slots (see nubus_disabled and | ||
| 95 | * via_nubus_irq_shutdown). | ||
| 94 | */ | 96 | */ |
| 95 | 97 | ||
| 96 | void baboon_irq_enable(int irq) | 98 | void baboon_irq_enable(int irq) |
| 97 | { | 99 | { |
| 98 | int irq_idx = IRQ_IDX(irq); | ||
| 99 | |||
| 100 | #ifdef DEBUG_IRQUSE | 100 | #ifdef DEBUG_IRQUSE |
| 101 | printk("baboon_irq_enable(%d)\n", irq); | 101 | printk("baboon_irq_enable(%d)\n", irq); |
| 102 | #endif | 102 | #endif |
| 103 | 103 | ||
| 104 | baboon_disabled &= ~(1 << irq_idx); | 104 | mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C)); |
| 105 | if (!baboon_disabled) | ||
| 106 | mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C)); | ||
| 107 | } | 105 | } |
| 108 | 106 | ||
| 109 | void baboon_irq_disable(int irq) | 107 | void baboon_irq_disable(int irq) |
| 110 | { | 108 | { |
| 111 | int irq_idx = IRQ_IDX(irq); | ||
| 112 | |||
| 113 | #ifdef DEBUG_IRQUSE | 109 | #ifdef DEBUG_IRQUSE |
| 114 | printk("baboon_irq_disable(%d)\n", irq); | 110 | printk("baboon_irq_disable(%d)\n", irq); |
| 115 | #endif | 111 | #endif |
| 116 | 112 | ||
| 117 | baboon_disabled |= 1 << irq_idx; | 113 | mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C)); |
| 118 | if (baboon_disabled) | ||
| 119 | mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C)); | ||
| 120 | } | 114 | } |
