Lines Matching +full:flip +full:- +full:chip

1 // SPDX-License-Identifier: GPL-2.0-only
3 * pata_sl82c105.c - SL82C105 PATA for new ATA layer
14 * PIO and DMA. We thus flip to the DMA timings in dma_start and flip back
45 * sl82c105_pre_reset - probe begin
58 struct ata_port *ap = link->ap; in sl82c105_pre_reset()
59 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sl82c105_pre_reset()
61 if (ap->port_no && !pci_test_config_bits(pdev, &sl82c105_enable_bits[ap->port_no])) in sl82c105_pre_reset()
62 return -ENOENT; in sl82c105_pre_reset()
68 * sl82c105_configure_piomode - set chip PIO timing
80 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sl82c105_configure_piomode()
85 int timing = 0x44 + (8 * ap->port_no) + (4 * adev->devno); in sl82c105_configure_piomode()
93 * sl82c105_set_piomode - set initial PIO mode data
103 sl82c105_configure_piomode(ap, adev, adev->pio_mode - XFER_PIO_0); in sl82c105_set_piomode()
107 * sl82c105_configure_dmamode - set DMA mode in chip
111 * Load DMA cycle times into the chip ready for a DMA transfer
117 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sl82c105_configure_dmamode()
122 int timing = 0x44 + (8 * ap->port_no) + (4 * adev->devno); in sl82c105_configure_dmamode()
123 int dma = adev->dma_mode - XFER_MW_DMA_0; in sl82c105_configure_dmamode()
131 * sl82c105_reset_engine - Reset the DMA engine
136 * recommended fix is to reset the engine each use using a chip
142 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sl82c105_reset_engine()
151 * sl82c105_bmdma_start - DMA engine begin
163 struct ata_port *ap = qc->ap; in sl82c105_bmdma_start()
170 sl82c105_configure_dmamode(ap, qc->dev); in sl82c105_bmdma_start()
176 * sl82c105_bmdma_stop - DMA engine stop
191 struct ata_port *ap = qc->ap; in sl82c105_bmdma_stop()
199 sl82c105_set_piomode(ap, qc->dev); in sl82c105_bmdma_stop()
203 * sl82c105_qc_defer - implement serialization
214 struct ata_host *host = qc->ap->host; in sl82c105_qc_defer()
215 struct ata_port *alt = host->ports[1 ^ qc->ap->port_no]; in sl82c105_qc_defer()
225 if (alt && alt->qc_active) in sl82c105_qc_defer()
232 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in sl82c105_sff_irq_check()
233 u32 val, mask = ap->port_no ? CTRL_IDE_IRQB : CTRL_IDE_IRQA; in sl82c105_sff_irq_check()
256 * sl82c105_bridge_revision - find bridge version
261 * find a revision or the right device it returns -1
271 bridge = pci_get_slot(pdev->bus, in sl82c105_bridge_revision()
272 PCI_DEVFN(PCI_SLOT(pdev->devfn), 0)); in sl82c105_bridge_revision()
274 return -1; in sl82c105_bridge_revision()
279 if (bridge->vendor != PCI_VENDOR_ID_WINBOND || in sl82c105_bridge_revision()
280 bridge->device != PCI_DEVICE_ID_WINBOND_83C553 || in sl82c105_bridge_revision()
281 bridge->class >> 8 != PCI_CLASS_BRIDGE_ISA) { in sl82c105_bridge_revision()
283 return -1; in sl82c105_bridge_revision()
289 return bridge->revision; in sl82c105_bridge_revision()
326 if (rev == -1) in sl82c105_init_one()
327 dev_warn(&dev->dev, in sl82c105_init_one()
330 dev_warn(&dev->dev, in sl82c105_init_one()
377 MODULE_DESCRIPTION("low-level driver for Sl82c105");