Lines Matching +full:broken +full:- +full:udma
1 // SPDX-License-Identifier: GPL-2.0-only
3 * pata_cmd64x.c - CMD64x PATA for new ATA layer
6 * (C) 2009-2010 Bartlomiej Zolnierkiewicz
21 * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
75 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
80 if (r & (1 << ap->port_no))
86 * cmd64x_set_timing - set PIO and MWDMA timing
96 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
113 int arttim = arttim_port[ap->port_no][adev->devno];
114 int drwtim = drwtim_port[ap->port_no][adev->devno];
122 if (ap->port_no) {
128 ata_timing_compute(pair, pair->pio_mode, &tp, T, 0);
136 t.active += t.recover - 16;
148 t.recover--;
170 * cmd64x_set_piomode - set initial PIO mode data
180 cmd64x_set_timing(ap, adev, adev->pio_mode);
184 * cmd64x_set_dmamode - set initial DMA mode data
197 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
200 int pciU = UDIDETCR0 + 8 * ap->port_no;
201 int pciD = BMIDESR0 + 8 * ap->port_no;
202 int shift = 2 * adev->devno;
208 regD &= ~(0x20 << adev->devno);
212 regU &= ~(0x05 << adev->devno);
214 if (adev->dma_mode >= XFER_UDMA_0) {
216 regU |= udma_data[adev->dma_mode - XFER_UDMA_0] << shift;
218 regU |= 1 << adev->devno; /* UDMA on */
219 if (adev->dma_mode > XFER_UDMA_2) /* 15nS timing */
220 regU |= 4 << adev->devno;
222 regU &= ~ (1 << adev->devno); /* UDMA off */
223 cmd64x_set_timing(ap, adev, adev->dma_mode);
226 regD |= 0x20 << adev->devno;
233 * cmd64x_sff_irq_check - check IDE interrupt
241 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
242 int irq_mask = ap->port_no ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
243 int irq_reg = ap->port_no ? ARTTIM23 : CFR;
253 * cmd64x_sff_irq_clear - clear IDE interrupt
261 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
262 int irq_reg = ap->port_no ? ARTTIM23 : CFR;
272 * cmd648_sff_irq_check - check IDE interrupt
280 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
282 int irq_mask = ap->port_no ? MRDMODE_INTR_CH1 : MRDMODE_INTR_CH0;
289 * cmd648_sff_irq_clear - clear IDE interrupt
297 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
299 int irq_mask = ap->port_no ? MRDMODE_INTR_CH1 : MRDMODE_INTR_CH0;
311 * cmd646r1_bmdma_stop - DMA stop callback
380 { /* CMD 643 - no UDMA */
386 { /* CMD 646 with broken UDMA */
392 { /* CMD 646U with broken UDMA */
398 { /* CMD 646U2 with working UDMA */
427 &cmd_info[id->driver_data],
428 &cmd_info[id->driver_data],
433 struct pci_dev *bridge = pdev->bus->self;
435 int port_ok = !(bridge && bridge->vendor ==
438 int cntrl_ch0_ok = (id->driver_data != 0);
444 if (id->driver_data == 0) /* 643 */
447 if (pdev->device == PCI_DEVICE_ID_CMD_646)
448 switch (pdev->revision) {
449 /* UDMA works since rev 5 */
477 dev_notice(&pdev->dev, "Mobility Bridge detected, ignoring CNTRL port enable/disable\n");
479 dev_notice(&pdev->dev, "Primary port is disabled\n");
484 dev_notice(&pdev->dev, "Secondary port is disabled\n");
531 MODULE_DESCRIPTION("low-level driver for CMD64x series PATA controllers");