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

1 // SPDX-License-Identifier: GPL-2.0-only
3 * pata_pdc202xx_old.c - Promise PDC202xx PATA for new ATA layer
29 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in pdc2026x_cable_detect()
33 if (cis & (1 << (10 + ap->port_no))) in pdc2026x_cable_detect()
41 DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command); in pdc202xx_exec_command()
43 iowrite8(tf->command, ap->ioaddr.command_addr); in pdc202xx_exec_command()
49 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in pdc202xx_irq_check()
53 if (ap->port_no) { in pdc202xx_irq_check()
69 * pdc202xx_configure_piomode - set chip PIO timing
81 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in pdc202xx_configure_piomode()
82 int port = 0x60 + 8 * ap->port_no + 4 * adev->devno; in pdc202xx_configure_piomode()
97 if (adev->class == ATA_DEV_ATA) in pdc202xx_configure_piomode()
104 * pdc202xx_set_piomode - set initial PIO mode data
114 pdc202xx_configure_piomode(ap, adev, adev->pio_mode - XFER_PIO_0); in pdc202xx_set_piomode()
118 * pdc202xx_set_dmamode - set DMA mode in chip
122 * Load DMA cycle times into the chip ready for a DMA transfer
128 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in pdc202xx_set_dmamode()
129 int port = 0x60 + 8 * ap->port_no + 4 * adev->devno; in pdc202xx_set_dmamode()
151 if (adev->dma_mode >= XFER_UDMA_0) { in pdc202xx_set_dmamode()
152 int speed = adev->dma_mode - XFER_UDMA_0; in pdc202xx_set_dmamode()
157 int speed = adev->dma_mode - XFER_MW_DMA_0; in pdc202xx_set_dmamode()
167 * pdc2026x_bmdma_start - DMA engine begin
179 struct ata_port *ap = qc->ap; in pdc2026x_bmdma_start()
180 struct ata_device *adev = qc->dev; in pdc2026x_bmdma_start()
181 struct ata_taskfile *tf = &qc->tf; in pdc2026x_bmdma_start()
182 int sel66 = ap->port_no ? 0x08: 0x02; in pdc2026x_bmdma_start()
184 void __iomem *master = ap->host->ports[0]->ioaddr.bmdma_addr; in pdc2026x_bmdma_start()
186 void __iomem *atapi_reg = master + 0x20 + (4 * ap->port_no); in pdc2026x_bmdma_start()
191 if (adev->dma_mode > XFER_UDMA_2) in pdc2026x_bmdma_start()
198 pdc202xx_set_dmamode(ap, qc->dev); in pdc2026x_bmdma_start()
201 if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATAPI_PROT_DMA) { in pdc2026x_bmdma_start()
202 len = qc->nbytes / 2; in pdc2026x_bmdma_start()
204 if (tf->flags & ATA_TFLAG_WRITE) in pdc2026x_bmdma_start()
217 * pdc2026x_bmdma_stop - DMA engine stop
229 struct ata_port *ap = qc->ap; in pdc2026x_bmdma_stop()
230 struct ata_device *adev = qc->dev; in pdc2026x_bmdma_stop()
231 struct ata_taskfile *tf = &qc->tf; in pdc2026x_bmdma_stop()
233 int sel66 = ap->port_no ? 0x08: 0x02; in pdc2026x_bmdma_stop()
235 void __iomem *master = ap->host->ports[0]->ioaddr.bmdma_addr; in pdc2026x_bmdma_stop()
237 void __iomem *atapi_reg = master + 0x20 + (4 * ap->port_no); in pdc2026x_bmdma_stop()
240 if (tf->protocol == ATAPI_PROT_DMA || (tf->flags & ATA_TFLAG_LBA48)) { in pdc2026x_bmdma_stop()
244 /* Flip back to 33Mhz for PIO */ in pdc2026x_bmdma_stop()
245 if (adev->dma_mode > XFER_UDMA_2) in pdc2026x_bmdma_stop()
252 * pdc2026x_dev_config - device setup hook
255 * Perform chip specific early setup. We need to lock the transfer
262 adev->max_sectors = 256; in pdc2026x_dev_config()
267 void __iomem *bmdma = ap->ioaddr.bmdma_addr; in pdc2026x_port_start()
277 * pdc2026x_check_atapi_dma - Check whether ATAPI DMA can be supported for this command
280 * Just say no - not supported on older Promise.
351 const struct ata_port_info *ppi[] = { &info[id->driver_data], NULL }; in pdc202xx_init_one()
353 if (dev->device == PCI_DEVICE_ID_PROMISE_20265) { in pdc202xx_init_one()
354 struct pci_dev *bridge = dev->bus->self; in pdc202xx_init_one()
356 if (bridge && bridge->vendor == PCI_VENDOR_ID_INTEL) { in pdc202xx_init_one()
357 if (bridge->device == PCI_DEVICE_ID_INTEL_I960) in pdc202xx_init_one()
358 return -ENODEV; in pdc202xx_init_one()
359 if (bridge->device == PCI_DEVICE_ID_INTEL_I960RM) in pdc202xx_init_one()
360 return -ENODEV; in pdc202xx_init_one()
390 MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267");