aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r--arch/sparc64/kernel/irq.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 31e0fbb0d82c..cc89b06d0178 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -563,67 +563,6 @@ void handler_irq(int irq, struct pt_regs *regs)
563 irq_exit(); 563 irq_exit();
564} 564}
565 565
566#ifdef CONFIG_BLK_DEV_FD
567extern irqreturn_t floppy_interrupt(int, void *, struct pt_regs *);
568
569/* XXX No easy way to include asm/floppy.h XXX */
570extern unsigned char *pdma_vaddr;
571extern unsigned long pdma_size;
572extern volatile int doing_pdma;
573extern unsigned long fdc_status;
574
575irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs)
576{
577 if (likely(doing_pdma)) {
578 void __iomem *stat = (void __iomem *) fdc_status;
579 unsigned char *vaddr = pdma_vaddr;
580 unsigned long size = pdma_size;
581 u8 val;
582
583 while (size) {
584 val = readb(stat);
585 if (unlikely(!(val & 0x80))) {
586 pdma_vaddr = vaddr;
587 pdma_size = size;
588 return IRQ_HANDLED;
589 }
590 if (unlikely(!(val & 0x20))) {
591 pdma_vaddr = vaddr;
592 pdma_size = size;
593 doing_pdma = 0;
594 goto main_interrupt;
595 }
596 if (val & 0x40) {
597 /* read */
598 *vaddr++ = readb(stat + 1);
599 } else {
600 unsigned char data = *vaddr++;
601
602 /* write */
603 writeb(data, stat + 1);
604 }
605 size--;
606 }
607
608 pdma_vaddr = vaddr;
609 pdma_size = size;
610
611 /* Send Terminal Count pulse to floppy controller. */
612 val = readb(auxio_register);
613 val |= AUXIO_AUX1_FTCNT;
614 writeb(val, auxio_register);
615 val &= ~AUXIO_AUX1_FTCNT;
616 writeb(val, auxio_register);
617
618 doing_pdma = 0;
619 }
620
621main_interrupt:
622 return floppy_interrupt(irq, dev_cookie, regs);
623}
624EXPORT_SYMBOL(sparc_floppy_irq);
625#endif
626
627struct sun5_timer { 566struct sun5_timer {
628 u64 count0; 567 u64 count0;
629 u64 limit0; 568 u64 limit0;