Lines Matching +full:- +full:viper

1 // SPDX-License-Identifier: GPL-2.0-only
3 * pata_optidma.c - Opti DMA PATA for new ATA layer
11 * This driver should support Viper-N+, FireStar, FireStar Plus.
48 * optidma_pre_reset - probe begin
57 struct ata_port *ap = link->ap; in optidma_pre_reset()
58 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in optidma_pre_reset()
63 if (ap->port_no && !pci_test_config_bits(pdev, &optidma_enable_bits)) in optidma_pre_reset()
64 return -ENOENT; in optidma_pre_reset()
70 * optidma_unlock - unlock control registers
79 void __iomem *regio = ap->ioaddr.cmd_addr; in optidma_unlock()
88 * optidma_lock - issue temporary relock
91 * Re-lock the configuration register settings.
96 void __iomem *regio = ap->ioaddr.cmd_addr; in optidma_lock()
103 * optidma_mode_setup - set mode data
119 int pio = adev->pio_mode - XFER_PIO_0; in optidma_mode_setup()
120 int dma = adev->dma_mode - XFER_MW_DMA_0; in optidma_mode_setup()
121 void __iomem *regio = ap->ioaddr.cmd_addr; in optidma_mode_setup()
159 pair_addr = addr_timing[pci_clock][pair->pio_mode - XFER_PIO_0]; in optidma_mode_setup()
166 iowrite8(adev->devno, regio + MISC_REG); in optidma_mode_setup()
176 iowrite8(addr | adev->devno, regio + MISC_REG); in optidma_mode_setup()
190 * optiplus_mode_setup - DMA setup for Firestar Plus
195 * The Firestar plus has additional UDMA functionality for UDMA0-2 and
203 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in optiplus_mode_setup()
206 int dev2 = 2 * adev->devno; in optiplus_mode_setup()
207 int unit = 2 * ap->port_no + adev->devno; in optiplus_mode_setup()
208 int udma = mode - XFER_UDMA_0; in optiplus_mode_setup()
213 optidma_mode_setup(ap, adev, adev->dma_mode); in optiplus_mode_setup()
216 if (ap->port_no) { in optiplus_mode_setup()
230 * optidma_set_pio_mode - PIO setup callback
241 optidma_mode_setup(ap, adev, adev->pio_mode); in optidma_set_pio_mode()
245 * optidma_set_dma_mode - DMA setup callback
256 optidma_mode_setup(ap, adev, adev->dma_mode); in optidma_set_dma_mode()
260 * optiplus_set_pio_mode - PIO setup callback
271 optiplus_mode_setup(ap, adev, adev->pio_mode); in optiplus_set_pio_mode()
275 * optiplus_set_dma_mode - DMA setup callback
286 optiplus_mode_setup(ap, adev, adev->dma_mode); in optiplus_set_dma_mode()
290 * optidma_make_bits43 - PCI setup helper
305 return adev->dma_mode - XFER_MW_DMA_0; in optidma_make_bits43()
306 return bits43[adev->pio_mode - XFER_PIO_0]; in optidma_make_bits43()
310 * optidma_set_mode - mode setup
321 struct ata_port *ap = link->ap; in optidma_set_mode()
323 int nybble = 4 * ap->port_no; in optidma_set_mode()
324 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in optidma_set_mode()
330 r |= (optidma_make_bits43(&link->device[0]) + in optidma_set_mode()
331 (optidma_make_bits43(&link->device[0]) << 2)) << nybble; in optidma_set_mode()
357 * optiplus_with_udma - Look for UDMA capable setup
417 ata_print_version_once(&dev->dev, DRV_VERSION); in optidma_init_one()
454 MODULE_DESCRIPTION("low-level driver for Opti Firestar/Firestar Plus");