aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2011-10-23 10:11:19 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-12-10 13:52:47 -0500
commitfeb11e8a5617cd337d8a83fd9cde38dba8ef050f (patch)
tree700cb8521ef6ca3648d30f93538e3630c7f1c79d /arch/m68k
parentda3fb3c9aaa357421ade92910303af82340c2ff5 (diff)
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>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/mac/baboon.c22
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
19int baboon_present; 19int baboon_present;
20static volatile struct baboon *baboon; 20static volatile struct baboon *baboon;
21static unsigned char baboon_disabled;
22 21
23#if 0 22#if 0
24extern int macide_ack_intr(struct ata_channel *); 23extern int macide_ack_intr(struct ata_channel *);
@@ -84,37 +83,32 @@ static void baboon_irq(unsigned int irq, struct irq_desc *desc)
84 83
85void __init baboon_register_interrupts(void) 84void __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
96void baboon_irq_enable(int irq) 98void 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
109void baboon_irq_disable(int irq) 107void 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}