void mac_free_irq(unsigned int irq, void *dev_id) { #ifdef DEBUG_MACINTS printk ("%s: irq %d freed by %p\n", __FUNCTION__, irq, dev_id); #endif if (irq < VIA1_SOURCE_BASE) { return sys_free_irq(irq, dev_id); } if (irq >= NUM_MAC_SOURCES) { printk ("%s: unknown irq %d freed\n", __FUNCTION__, irq); return; } mac_delete_irq(&mac_irq_list[irq], dev_id); /* If the list for this interrupt is */ /* empty then disable the source. */ if (!mac_irq_list[irq]) { mac_disable_irq(irq); } }
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_disable_irq(IRQ_NUBUS_C); }
static void mac_scsi_reset_boot(struct Scsi_Host *instance) { unsigned long end; NCR5380_local_declare(); NCR5380_setup(instance); /* * Do a SCSI reset to clean up the bus during initialization. No messing * with the queues, interrupts, or locks necessary here. */ printk(KERN_INFO "Macintosh SCSI: resetting the SCSI bus..." ); /* switch off SCSI IRQ - catch an interrupt without IRQ bit set else */ mac_disable_irq(IRQ_MAC_SCSI); /* get in phase */ NCR5380_write( TARGET_COMMAND_REG, PHASE_SR_TO_TCR( NCR5380_read(STATUS_REG) )); /* assert RST */ NCR5380_write( INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_RST ); /* The min. reset hold time is 25us, so 40us should be enough */ udelay( 50 ); /* reset RST and interrupt */ NCR5380_write( INITIATOR_COMMAND_REG, ICR_BASE ); NCR5380_read( RESET_PARITY_INTERRUPT_REG ); for( end = jiffies + AFTER_RESET_DELAY; time_before(jiffies, end); ) barrier(); /* switch on SCSI IRQ again */ mac_enable_irq(IRQ_MAC_SCSI); printk(KERN_INFO " done\n" ); }