• Home
  • Raw
  • Download

Lines Matching +full:udma +full:- +full:c

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * linux/drivers/ide/pdc202xx.c Version 0.35 Mar. 30, 2002
7 * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>
8 * Copyright (C) 2005-2007 MontaVista Software, Inc.
9 * Portions Copyright (C) 1999 Promise Technology, Inc.
43 switch(pdev->device) { in max_dma_rate()
63 * get_indexed_reg - Get indexed register
71 outb(index, hwif->dma_base + 1); in get_indexed_reg()
72 value = inb(hwif->dma_base + 3); in get_indexed_reg()
79 * set_indexed_reg - Set indexed register
85 outb(index, hwif->dma_base + 1); in set_indexed_reg()
86 outb(value, hwif->dma_base + 3); in set_indexed_reg()
119 { 0x4a, 0x0f, 0xd5 }, /* UDMA mode 0 */
120 { 0x3a, 0x0a, 0xd0 }, /* UDMA mode 1 */
121 { 0x2a, 0x07, 0xcd }, /* UDMA mode 2 */
122 { 0x1a, 0x05, 0xcd }, /* UDMA mode 3 */
123 { 0x1a, 0x03, 0xcd }, /* UDMA mode 4 */
124 { 0x1a, 0x02, 0xcb }, /* UDMA mode 5 */
125 { 0x1a, 0x01, 0xcb }, /* UDMA mode 6 */
130 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdcnew_set_dma_mode()
131 u8 adj = (drive->dn & 1) ? 0x08 : 0x00; in pdcnew_set_dma_mode()
132 const u8 speed = drive->dma_mode; in pdcnew_set_dma_mode()
136 * IDE_HFLAG_POST_SET_MODE in ->host_flags). PDC202xx hardware will in pdcnew_set_dma_mode()
159 /* Set tHOLD bit to 0 if using UDMA mode 2 */ in pdcnew_set_dma_mode()
168 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdcnew_set_pio_mode()
169 u8 adj = (drive->dn & 1) ? 0x08 : 0x00; in pdcnew_set_pio_mode()
170 const u8 pio = drive->pio_mode - XFER_PIO_0; in pdcnew_set_pio_mode()
193 drive->hwif->channel ? "Secondary" : "Primary"); in pdcnew_reset()
197 * read_counter - Read the byte count registers
223 * The 30-bit decrementing counter is read in 4 pieces. in read_counter()
227 } while (retry-- && (((last ^ count) & 0x3fff8000) || last < count)); in read_counter()
236 * detect_pll_input_clock - Detect the PLL input clock in Hz.
273 pll_input = ((start_count - end_count) & 0x3fffffff) / 10 * in detect_pll_input_clock()
287 if (np == NULL || !of_device_is_compatible(np, "kiwi-root")) in apple_kiwi_init()
290 if (pdev->revision >= 0x03) { in apple_kiwi_init()
308 return -EFAULT; in init_chipset_pdcnew()
327 * On some systems, where PCI bus is running at non-standard clock rate in init_chipset_pdcnew()
380 f = (ratio * (r + 2)) / 1000 - 2; in init_chipset_pdcnew()
424 dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 1, in pdc20270_get_dev2()
425 PCI_FUNC(dev->devfn))); in pdc20270_get_dev2()
428 dev2->vendor == dev->vendor && in pdc20270_get_dev2()
429 dev2->device == dev->device) { in pdc20270_get_dev2()
431 if (dev2->irq != dev->irq) { in pdc20270_get_dev2()
432 dev2->irq = dev->irq; in pdc20270_get_dev2()
450 #define DECLARE_PDCNEW_DEV(udma) \ argument
460 .udma_mask = udma, \
469 * pdc202new_init_one - called when a pdc202xx is found
479 const struct ide_port_info *d = &pdcnew_chipsets[id->driver_data]; in pdc202new_init_one()
480 struct pci_dev *bridge = dev->bus->self; in pdc202new_init_one()
482 if (dev->device == PCI_DEVICE_ID_PROMISE_20270 && bridge && in pdc202new_init_one()
483 bridge->vendor == PCI_VENDOR_ID_DEC && in pdc202new_init_one()
484 bridge->device == PCI_DEVICE_ID_DEC_21150) { in pdc202new_init_one()
487 if (PCI_SLOT(dev->devfn) & 2) in pdc202new_init_one()
488 return -ENODEV; in pdc202new_init_one()
500 if (dev->device == PCI_DEVICE_ID_PROMISE_20276 && bridge && in pdc202new_init_one()
501 bridge->vendor == PCI_VENDOR_ID_INTEL && in pdc202new_init_one()
502 (bridge->device == PCI_DEVICE_ID_INTEL_I960 || in pdc202new_init_one()
503 bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { in pdc202new_init_one()
506 return -ENODEV; in pdc202new_init_one()
515 struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL; in pdc202new_remove()