Lines Matching +full:ati +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-only
3 * pata_atiixp.c - ATI PATA for new ATA layer
5 * (C) 2009-2010 Bartlomiej Zolnierkiewicz
9 * linux/drivers/ide/pci/atiixp.c Version 0.01-bart2 Feb. 26, 2004
11 * Copyright (C) 2003 ATI Inc. <hyu@ati.com>
39 /* Board has onboard PATA<->SATA converters */
40 .ident = "MSI E350DM-E33",
43 DMI_MATCH(DMI_BOARD_NAME, "E350DM-E33(MS-7720)"),
51 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in atiixp_cable_detect()
58 raw detection not play follow the bios mode guess */ in atiixp_cable_detect()
59 pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ap->port_no, &udma); in atiixp_cable_detect()
68 * atiixp_prereset - perform reset handling
83 struct ata_port *ap = link->ap; in atiixp_prereset()
84 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in atiixp_prereset()
86 if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) in atiixp_prereset()
87 return -ENOENT; in atiixp_prereset()
93 * atiixp_set_pio_timing - set initial PIO mode data
98 * timings for PIO transfers. We must load both the mode number and
106 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in atiixp_set_pio_timing()
107 int dn = 2 * ap->port_no + adev->devno; in atiixp_set_pio_timing()
108 int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1); in atiixp_set_pio_timing()
124 * atiixp_set_piomode - set initial PIO mode data
128 * Called to do the PIO mode setup. We use a shared helper for this
136 atiixp_set_pio_timing(ap, adev, adev->pio_mode - XFER_PIO_0); in atiixp_set_piomode()
141 * atiixp_set_dmamode - set initial DMA mode data
145 * Called to do the DMA mode setup. We use timing tables for most
146 * modes but must tune an appropriate PIO mode to match.
153 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in atiixp_set_dmamode()
154 int dma = adev->dma_mode; in atiixp_set_dmamode()
155 int dn = 2 * ap->port_no + adev->devno; in atiixp_set_dmamode()
161 if (adev->dma_mode >= XFER_UDMA_0) { in atiixp_set_dmamode()
164 dma -= XFER_UDMA_0; in atiixp_set_dmamode()
171 int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1); in atiixp_set_dmamode()
174 dma -= XFER_MW_DMA_0; in atiixp_set_dmamode()
184 * We must now look at the PIO mode situation. We may need to in atiixp_set_dmamode()
185 * adjust the PIO mode to keep the timings acceptable in atiixp_set_dmamode()
187 if (adev->dma_mode >= XFER_MW_DMA_2) in atiixp_set_dmamode()
189 else if (adev->dma_mode == XFER_MW_DMA_1) in atiixp_set_dmamode()
191 else if (adev->dma_mode == XFER_MW_DMA_0) in atiixp_set_dmamode()
195 if (adev->pio_mode != wanted_pio) in atiixp_set_dmamode()
201 * atiixp_bmdma_start - DMA start callback
213 struct ata_port *ap = qc->ap; in atiixp_bmdma_start()
214 struct ata_device *adev = qc->dev; in atiixp_bmdma_start()
216 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in atiixp_bmdma_start()
217 int dn = (2 * ap->port_no) + adev->devno; in atiixp_bmdma_start()
230 * atiixp_dma_stop - DMA stop callback
242 struct ata_port *ap = qc->ap; in atiixp_bmdma_stop()
243 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in atiixp_bmdma_stop()
244 int dn = (2 * ap->port_no) + qc->dev->devno; in atiixp_bmdma_stop()
283 if (pdev->device == PCI_DEVICE_ID_ATI_IXP600_IDE) in atiixp_init_one()
291 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP200_IDE), },
292 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP300_IDE), },
293 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), },
294 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), },
295 { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), },
315 MODULE_DESCRIPTION("low-level driver for ATI IXP200/300/400");