Lines Matching +full:mode +full:- +full:xxx

1 /* SPDX-License-Identifier: GPL-2.0 */
15 #include <linux/dma-mapping.h>
45 static struct sun_flpy_controller *sun_fdc = (struct sun_flpy_controller *)-1;
73 #define fd_set_dma_mode(mode) sun_fdops.fd_set_dma_mode(mode) argument
109 return sbus_readb(&sun_fdc->status_82077) & ~STATUS_DMA; in sun_82077_fd_inb()
111 return sbus_readb(&sun_fdc->data_82077); in sun_82077_fd_inb()
113 /* XXX: Is DCL on 0x80 in sun4m? */ in sun_82077_fd_inb()
114 return sbus_readb(&sun_fdc->dir_82077); in sun_82077_fd_inb()
129 sbus_writeb(value, &sun_fdc->dor_82077); in sun_82077_fd_outb()
132 sbus_writeb(value, &sun_fdc->data_82077); in sun_82077_fd_outb()
135 sbus_writeb(value, &sun_fdc->dcr_82077); in sun_82077_fd_outb()
138 sbus_writeb(value, &sun_fdc->status_82077); in sun_82077_fd_outb()
144 /* For pseudo-dma (Sun floppy drives have no real DMA available to
146 * three state variables. doing_pdma tells our inline low-level
149 * floppy interrupt c-code. I tried very hard but I could not get the
150 * pseudo-dma to work in c-code without getting many overruns and
151 * underruns. If non-zero, doing_pdma encodes the direction of
169 static void sun_fd_set_dma_mode(int mode) in sun_fd_set_dma_mode() argument
171 switch(mode) { in sun_fd_set_dma_mode()
179 printk("Unknown dma mode %d\n", mode); in sun_fd_set_dma_mode()
230 size--; in sparc_floppy_irq()
261 return ((error == 0) ? 0 : -1); in sun_fd_request_irq()
272 /* XXX This isn't really correct. XXX */ in sun_get_dma_residue()
290 static int sun_pci_broken_drive = -1;
298 static struct sun_pci_dma_op sun_pci_dma_current = { -1U, 0, 0, NULL};
299 static struct sun_pci_dma_op sun_pci_dma_pending = { -1U, 0, 0, NULL};
321 * XXX: Due to SUN's broken floppy connector on AX and AXi in sun_pci_fd_broken_outb()
341 * XXX: Due to SUN's broken floppy connector on AX and AXi in sun_pci_fd_lde_broken_outb()
370 sun_pci_dma_pending.addr = -1U; in sun_pci_fd_enable_dma()
389 if (sun_pci_dma_current.addr != -1U) in sun_pci_fd_disable_dma()
394 sun_pci_dma_current.addr = -1U; in sun_pci_fd_disable_dma()
397 static void sun_pci_fd_set_dma_mode(int mode) in sun_pci_fd_set_dma_mode() argument
399 if (mode == DMA_MODE_WRITE) in sun_pci_fd_set_dma_mode()
404 ebus_dma_prepare(&sun_pci_fd_ebus_dma, mode != DMA_MODE_WRITE); in sun_pci_fd_set_dma_mode()
434 return -EINVAL; in sun_pci_fd_eject()
458 while (!((status = inb(MSR)) & 0x80) && --timeout) in sun_pci_fd_out_byte()
473 while (!((status = inb(MSR)) & 0x80) && --timeout) in sun_pci_fd_sensei()
501 } while ((mask != 0x0f) && --timeout); in sun_pci_fd_reset()
521 } while (((status & 0xc0) == 0x80) && --timeout); in sun_pci_fd_test_drive()
564 if (!of_node_name_eq(dp->parent, "sbus")) in sun_floppy_init()
572 FLOPPY_IRQ = op->archdata.irqs[0]; in sun_floppy_init()
581 for (dp = ebus_dp->child; dp; dp = dp->sibling) { in sun_floppy_init()
594 state_prop = of_get_property(op->dev.of_node, "status", NULL); in sun_floppy_init()
598 FLOPPY_IRQ = op->archdata.irqs[0]; in sun_floppy_init()
603 auxio_reg = (void __iomem *) op->resource[2].start; in sun_floppy_init()
606 sun_floppy_dev = &op->dev; in sun_floppy_init()
610 /* XXX ioremap */ in sun_floppy_init()
612 op->resource[1].start; in sun_floppy_init()
625 /* XXX ioremap */ in sun_floppy_init()
626 sun_fdc = (struct sun_flpy_controller *) op->resource[0].start; in sun_floppy_init()
644 fdc_status = (unsigned long) &sun_fdc->status_82077; in sun_floppy_init()
647 * XXX: Find out on which machines this is really needed. in sun_floppy_init()
664 for (dp = ebus_dp->child; dp; dp = dp->sibling) { in sun_floppy_init()
670 config = ecpp_op->resource[1].start; in sun_floppy_init()
692 /* Enable PC-AT mode. */ in sun_floppy_init()
710 if (sun_pci_broken_drive != -1) { in sun_floppy_init()
711 sun_pci_broken_drive = 1 - sun_pci_broken_drive; in sun_floppy_init()
719 prop = of_get_property(op->dev.of_node, "status", NULL); in sun_floppy_init()
730 (op->resource[0].start + in sun_floppy_init()
731 ((op->resource[0].flags & 0x1ffUL) << 32UL)); in sun_floppy_init()
734 if (sbus_readb(&sun_fdc->status1_82077) == 0xff) { in sun_floppy_init()
735 sun_fdc = (struct sun_flpy_controller *)-1; in sun_floppy_init()
755 fdc_status = (unsigned long) &sun_fdc->status_82077; in sun_floppy_init()