diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-25 04:32:25 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-26 02:15:01 -0400 |
commit | 350559961593a9680244b22b32733a49e21f25d6 (patch) | |
tree | 587baa8873bfede50fb9d7fdf06176001f2f947f /arch/sparc64/kernel | |
parent | 698539187aee83ea6843e29875dde70b473f8bc1 (diff) |
[SPARC64]: Allow floppy driver to build modular.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 61 |
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 | ||
567 | extern irqreturn_t floppy_interrupt(int, void *, struct pt_regs *); | ||
568 | |||
569 | /* XXX No easy way to include asm/floppy.h XXX */ | ||
570 | extern unsigned char *pdma_vaddr; | ||
571 | extern unsigned long pdma_size; | ||
572 | extern volatile int doing_pdma; | ||
573 | extern unsigned long fdc_status; | ||
574 | |||
575 | irqreturn_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 | |||
621 | main_interrupt: | ||
622 | return floppy_interrupt(irq, dev_cookie, regs); | ||
623 | } | ||
624 | EXPORT_SYMBOL(sparc_floppy_irq); | ||
625 | #endif | ||
626 | |||
627 | struct sun5_timer { | 566 | struct sun5_timer { |
628 | u64 count0; | 567 | u64 count0; |
629 | u64 limit0; | 568 | u64 limit0; |