Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280010
b: refs/heads/master
c: feb11e8
h: refs/heads/master
v: v3
  • Loading branch information
Finn Thain authored and Geert Uytterhoeven committed Dec 10, 2011
1 parent b0c4081 commit dcfabb7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da3fb3c9aaa357421ade92910303af82340c2ff5
refs/heads/master: feb11e8a5617cd337d8a83fd9cde38dba8ef050f
22 changes: 8 additions & 14 deletions trunk/arch/m68k/mac/baboon.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,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 *);
Expand Down Expand Up @@ -84,37 +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));
mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));
}

0 comments on commit dcfabb7

Please sign in to comment.