Skip to content

Commit feb11e8

Browse files
Finn Thaingeertu
authored andcommitted
m68k/mac: fix baboon irq disable and shutdown
The baboon_disabled hack is broken because it is missing an irq shutdown method. So releasing a Baboon irq kills the other Baboon irqs. But we don't really need this hack because we don't have media bay support and TREX uses a NuBus IRQ. Remove it. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
1 parent da3fb3c commit feb11e8

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

‎arch/m68k/mac/baboon.c‎

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
int baboon_present;
2020
static volatile struct baboon *baboon;
21-
static unsigned char baboon_disabled;
2221

2322
#if 0
2423
extern int macide_ack_intr(struct ata_channel *);
@@ -84,37 +83,32 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc)
8483

8584
void __init baboon_register_interrupts(void)
8685
{
87-
baboon_disabled = 0;
8886
irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq);
8987
}
9088

9189
/*
92-
* The means for masking individual baboon interrupts remains a mystery, so
93-
* enable the umbrella interrupt only when no baboon interrupt is disabled.
90+
* The means for masking individual Baboon interrupts remains a mystery.
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).
9496
*/
9597

9698
void baboon_irq_enable(int irq)
9799
{
98-
int irq_idx = IRQ_IDX(irq);
99-
100100
#ifdef DEBUG_IRQUSE
101101
printk("baboon_irq_enable(%d)\n", irq);
102102
#endif
103103

104-
baboon_disabled &= ~(1 << irq_idx);
105-
if (!baboon_disabled)
106-
mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
104+
mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
107105
}
108106

109107
void baboon_irq_disable(int irq)
110108
{
111-
int irq_idx = IRQ_IDX(irq);
112-
113109
#ifdef DEBUG_IRQUSE
114110
printk("baboon_irq_disable(%d)\n", irq);
115111
#endif
116112

117-
baboon_disabled |= 1 << irq_idx;
118-
if (baboon_disabled)
119-
mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));
113+
mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));
120114
}

0 commit comments

Comments
 (0)