Lines Matching +full:mode +full:- +full:recovery
1 // SPDX-License-Identifier: GPL-2.0-or-later
8 * PIO mode and smarter silicon.
11 * drive for the right PIO mode and ignore the drive bus mastering DMA
40 int recovery; member
52 * cs5520_set_timings - program PIO timings
57 * Program the PIO mode timings for the controller according to the pio
63 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in cs5520_set_timings()
64 int slave = adev->devno; in cs5520_set_timings()
66 pio -= XFER_PIO_0; in cs5520_set_timings()
69 pci_write_config_byte(pdev, 0x62 + ap->port_no, in cs5520_set_timings()
70 (cs5520_pio_clocks[pio].recovery << 4) | in cs5520_set_timings()
74 pci_write_config_byte(pdev, 0x64 + 4*ap->port_no + slave, in cs5520_set_timings()
75 (cs5520_pio_clocks[pio].recovery << 4) | in cs5520_set_timings()
78 pci_write_config_byte(pdev, 0x66 + 4*ap->port_no + slave, in cs5520_set_timings()
79 (cs5520_pio_clocks[pio].recovery << 4) | in cs5520_set_timings()
84 * cs5520_set_piomode - program PIO timings
88 * Program the PIO mode timings for the controller according to the pio
94 cs5520_set_timings(ap, adev, adev->pio_mode); in cs5520_set_piomode()
135 return -ENODEV; in cs5520_init_one()
144 dev_warn(&pdev->dev, "DMA mode disabled. Enabling.\n"); in cs5520_init_one()
148 pi.mwdma_mask = id->driver_data; in cs5520_init_one()
150 host = ata_host_alloc_pinfo(&pdev->dev, ppi, 2); in cs5520_init_one()
152 return -ENOMEM; in cs5520_init_one()
154 if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) { in cs5520_init_one()
155 dev_err(&pdev->dev, "unable to configure DMA mask.\n"); in cs5520_init_one()
156 return -ENODEV; in cs5520_init_one()
160 iomap[0] = devm_ioport_map(&pdev->dev, cmd_port[0], 8); in cs5520_init_one()
161 iomap[1] = devm_ioport_map(&pdev->dev, ctl_port[0], 1); in cs5520_init_one()
162 iomap[2] = devm_ioport_map(&pdev->dev, cmd_port[1], 8); in cs5520_init_one()
163 iomap[3] = devm_ioport_map(&pdev->dev, ctl_port[1], 1); in cs5520_init_one()
167 return -ENOMEM; in cs5520_init_one()
169 ioaddr = &host->ports[0]->ioaddr; in cs5520_init_one()
170 ioaddr->cmd_addr = iomap[0]; in cs5520_init_one()
171 ioaddr->ctl_addr = iomap[1]; in cs5520_init_one()
172 ioaddr->altstatus_addr = iomap[1]; in cs5520_init_one()
173 ioaddr->bmdma_addr = iomap[4]; in cs5520_init_one()
176 ata_port_desc(host->ports[0], in cs5520_init_one()
178 ata_port_pbar_desc(host->ports[0], 4, 0, "bmdma"); in cs5520_init_one()
180 ioaddr = &host->ports[1]->ioaddr; in cs5520_init_one()
181 ioaddr->cmd_addr = iomap[2]; in cs5520_init_one()
182 ioaddr->ctl_addr = iomap[3]; in cs5520_init_one()
183 ioaddr->altstatus_addr = iomap[3]; in cs5520_init_one()
184 ioaddr->bmdma_addr = iomap[4] + 8; in cs5520_init_one()
187 ata_port_desc(host->ports[1], in cs5520_init_one()
189 ata_port_pbar_desc(host->ports[1], 4, 8, "bmdma"); in cs5520_init_one()
199 struct ata_port *ap = host->ports[i]; in cs5520_init_one()
204 rc = devm_request_irq(&pdev->dev, irq[ap->port_no], in cs5520_init_one()
217 * cs5520_reinit_one - device resume
221 * to restore DMA mode support on BIOSen which disabled it
243 * cs5520_pci_device_suspend - device suspend
288 MODULE_DESCRIPTION("low-level driver for Cyrix CS5510/5520");