aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/floppy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64/floppy.h')
-rw-r--r--include/asm-sparc64/floppy.h84
1 files changed, 1 insertions, 83 deletions
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index c47f58d6c15c..ca19f80a9b7d 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -293,7 +293,6 @@ static int sun_fd_eject(int drive)
293 293
294#ifdef CONFIG_PCI 294#ifdef CONFIG_PCI
295#include <asm/ebus.h> 295#include <asm/ebus.h>
296#include <asm/isa.h>
297#include <asm/ns87303.h> 296#include <asm/ns87303.h>
298 297
299static struct ebus_dma_info sun_pci_fd_ebus_dma; 298static struct ebus_dma_info sun_pci_fd_ebus_dma;
@@ -558,82 +557,6 @@ static int __init ebus_fdthree_p(struct linux_ebus_device *edev)
558} 557}
559#endif 558#endif
560 559
561#ifdef CONFIG_PCI
562#undef ISA_FLOPPY_WORKS
563
564#ifdef ISA_FLOPPY_WORKS
565static unsigned long __init isa_floppy_init(void)
566{
567 struct sparc_isa_bridge *isa_br;
568 struct sparc_isa_device *isa_dev = NULL;
569
570 for_each_isa(isa_br) {
571 for_each_isadev(isa_dev, isa_br) {
572 if (!strcmp(isa_dev->prom_node->name, "dma")) {
573 struct sparc_isa_device *child =
574 isa_dev->child;
575
576 while (child) {
577 if (!strcmp(child->prom_node->name,
578 "floppy")) {
579 isa_dev = child;
580 goto isa_done;
581 }
582 child = child->next;
583 }
584 }
585 }
586 }
587isa_done:
588 if (!isa_dev)
589 return 0;
590
591 /* We could use DMA on devices behind the ISA bridge, but...
592 *
593 * There is a slight problem. Normally on x86 kit the x86 processor
594 * delays I/O port instructions when the ISA bus "dma in progress"
595 * signal is active. Well, sparc64 systems do not monitor this
596 * signal thus we would need to block all I/O port accesses in software
597 * when a dma transfer is active for some device.
598 */
599
600 sun_fdc = (struct sun_flpy_controller *)isa_dev->resource.start;
601 FLOPPY_IRQ = isa_dev->irq;
602
603 sun_fdops.fd_inb = sun_pci_fd_inb;
604 sun_fdops.fd_outb = sun_pci_fd_outb;
605
606 can_use_virtual_dma = use_virtual_dma = 1;
607 sun_fdops.fd_enable_dma = sun_fd_enable_dma;
608 sun_fdops.fd_disable_dma = sun_fd_disable_dma;
609 sun_fdops.fd_set_dma_mode = sun_fd_set_dma_mode;
610 sun_fdops.fd_set_dma_addr = sun_fd_set_dma_addr;
611 sun_fdops.fd_set_dma_count = sun_fd_set_dma_count;
612 sun_fdops.get_dma_residue = sun_get_dma_residue;
613
614 sun_fdops.fd_request_irq = sun_fd_request_irq;
615 sun_fdops.fd_free_irq = sun_fd_free_irq;
616
617 /* Floppy eject is manual. Actually, could determine this
618 * via presence of 'manual' property in OBP node.
619 */
620 sun_fdops.fd_eject = sun_pci_fd_eject;
621
622 fdc_status = (unsigned long) &sun_fdc->status_82077;
623
624 allowed_drive_mask = 0;
625 sun_floppy_types[0] = 0;
626 sun_floppy_types[1] = 4;
627
628 sun_pci_broken_drive = 1;
629 sun_fdops.fd_outb = sun_pci_fd_broken_outb;
630
631 return sun_floppy_types[0];
632}
633#endif /* ISA_FLOPPY_WORKS */
634
635#endif
636
637static unsigned long __init sun_floppy_init(void) 560static unsigned long __init sun_floppy_init(void)
638{ 561{
639 char state[128]; 562 char state[128];
@@ -667,13 +590,8 @@ static unsigned long __init sun_floppy_init(void)
667 } 590 }
668 } 591 }
669 ebus_done: 592 ebus_done:
670 if (!edev) { 593 if (!edev)
671#ifdef ISA_FLOPPY_WORKS
672 return isa_floppy_init();
673#else
674 return 0; 594 return 0;
675#endif
676 }
677 595
678 state_prop = of_get_property(edev->prom_node, "status", NULL); 596 state_prop = of_get_property(edev->prom_node, "status", NULL);
679 if (state_prop && !strncmp(state_prop, "disabled", 8)) 597 if (state_prop && !strncmp(state_prop, "disabled", 8))