Lines Matching +full:timing +full:- +full:controller

1 // SPDX-License-Identifier: GPL-2.0-only
3 * pata_oldpiix.c - Intel PATA/SATA controllers
10 * SITRE and the slave timing registers. This means that you have to
11 * set timing per channel, or be clever. Libata tells us whenever it
31 * oldpiix_pre_reset - probe begin
40 struct ata_port *ap = link->ap; in oldpiix_pre_reset()
41 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in oldpiix_pre_reset()
47 if (!pci_test_config_bits(pdev, &oldpiix_enable_bits[ap->port_no])) in oldpiix_pre_reset()
48 return -ENOENT; in oldpiix_pre_reset()
54 * oldpiix_set_piomode - Initialize host controller PATA PIO timings
58 * Set PIO mode for device, in host controller PCI config space.
66 unsigned int pio = adev->pio_mode - XFER_PIO_0; in oldpiix_set_piomode()
67 struct pci_dev *dev = to_pci_dev(ap->host->dev); in oldpiix_set_piomode()
68 unsigned int idetm_port= ap->port_no ? 0x42 : 0x40; in oldpiix_set_piomode()
73 * See Intel Document 298600-004 for the timing programming rules in oldpiix_set_piomode()
75 * timing port at 0x44. in oldpiix_set_piomode()
91 if (adev->class == ATA_DEV_ATA) in oldpiix_set_piomode()
98 * Clear the other drive's timing bits. in oldpiix_set_piomode()
100 if (adev->devno == 0) { in oldpiix_set_piomode()
112 ap->private_data = adev; in oldpiix_set_piomode()
116 * oldpiix_set_dmamode - Initialize host controller PATA DMA timings
120 * Set MWDMA mode for device, in host controller PCI config space.
128 struct pci_dev *dev = to_pci_dev(ap->host->dev); in oldpiix_set_dmamode()
129 u8 idetm_port = ap->port_no ? 0x42 : 0x40; in oldpiix_set_dmamode()
142 * been set when the PIO timing was set. in oldpiix_set_dmamode()
145 unsigned int mwdma = adev->dma_mode - XFER_MW_DMA_0; in oldpiix_set_dmamode()
150 int pio = needed_pio[mwdma] - XFER_PIO_0; in oldpiix_set_dmamode()
156 if (adev->class == ATA_DEV_ATA) in oldpiix_set_dmamode()
162 if (adev->pio_mode < needed_pio[mwdma]) in oldpiix_set_dmamode()
163 /* Enable DMA timing only */ in oldpiix_set_dmamode()
166 /* Mask out the relevant control and timing bits we will load. Also in oldpiix_set_dmamode()
168 if (adev->devno == 0) { in oldpiix_set_dmamode()
179 ap->private_data = adev; in oldpiix_set_dmamode()
183 * oldpiix_qc_issue - command issue
195 struct ata_port *ap = qc->ap; in oldpiix_qc_issue()
196 struct ata_device *adev = qc->dev; in oldpiix_qc_issue()
198 if (adev != ap->private_data) { in oldpiix_qc_issue()
222 * oldpiix_init_one - Register PIIX ATA PCI device with kernel services
233 * Zero on success, or -ERRNO value.
246 ata_print_version_once(&pdev->dev, DRV_VERSION); in oldpiix_init_one()
271 MODULE_DESCRIPTION("SCSI low-level driver for early PIIX series controllers");