Lines Matching +full:udma +full:- +full:c
1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (c) 2000-2002 Vojtech Pavlik
7 * Copyright (c) 2007-2010 Bartlomiej Zolnierkiewicz
39 return (dev->vendor == PCI_VENDOR_ID_NVIDIA) ? 0x10 : 0; in amd_offset()
52 t = (t & ~(3 << ((3 - dn) << 1))) | ((clamp_val(timing->setup, 1, 4) - 1) << ((3 - dn) << 1)); in amd_set_speed()
55 pci_write_config_byte(dev, AMD_8BIT_TIMING + offset + (1 - (dn >> 1)), in amd_set_speed()
56 ((clamp_val(timing->act8b, 1, 16) - 1) << 4) | (clamp_val(timing->rec8b, 1, 16) - 1)); in amd_set_speed()
58 pci_write_config_byte(dev, AMD_DRIVE_TIMING + offset + (3 - dn), in amd_set_speed()
59 ((clamp_val(timing->active, 1, 16) - 1) << 4) | (clamp_val(timing->recover, 1, 16) - 1)); in amd_set_speed()
62 case ATA_UDMA2: t = timing->udma ? (0xc0 | (clamp_val(timing->udma, 2, 5) - 2)) : 0x03; break; in amd_set_speed()
63 …case ATA_UDMA4: t = timing->udma ? (0xc0 | amd_cyc2udma[clamp_val(timing->udma, 2, 10)]) : 0x03; b… in amd_set_speed()
64 …case ATA_UDMA5: t = timing->udma ? (0xc0 | amd_cyc2udma[clamp_val(timing->udma, 1, 10)]) : 0x03; b… in amd_set_speed()
65 …case ATA_UDMA6: t = timing->udma ? (0xc0 | amd_cyc2udma[clamp_val(timing->udma, 1, 15)]) : 0x03; b… in amd_set_speed()
69 if (timing->udma) in amd_set_speed()
70 pci_write_config_byte(dev, AMD_UDMA_TIMING + offset + 3 - dn, t); in amd_set_speed()
80 struct pci_dev *dev = to_pci_dev(hwif->dev); in amd_set_drive()
84 u8 udma_mask = hwif->ultra_mask; in amd_set_drive()
85 const u8 speed = drive->dma_mode; in amd_set_drive()
93 ide_timing_compute(peer, peer->pio_mode, &p, T, UT); in amd_set_drive()
97 if (speed == XFER_UDMA_5 && amd_clock <= 33333) t.udma = 1; in amd_set_drive()
98 if (speed == XFER_UDMA_6 && amd_clock <= 33333) t.udma = 15; in amd_set_drive()
100 amd_set_speed(dev, drive->dn, udma_mask, &t); in amd_set_drive()
104 * amd_set_pio_mode() is a callback from upper layers for PIO-only tuning.
109 drive->dma_mode = drive->pio_mode; in amd_set_pio_mode()
128 for (i = 24; i >= 0; i -= 8) in amd7411_cable_detect()
129 if (((u >> i) & 4) && !(amd_80w & (1 << (1 - (i >> 4))))) { in amd7411_cable_detect()
133 amd_80w |= (1 << (1 - (i >> 4))); in amd7411_cable_detect()
146 * Check 80-wire cable presence. in init_chipset_amd74xx()
149 if (dev->vendor == PCI_VENDOR_ID_AMD && in init_chipset_amd74xx()
150 dev->device == PCI_DEVICE_ID_AMD_COBRA_7401) in init_chipset_amd74xx()
151 ; /* no UDMA > 2 */ in init_chipset_amd74xx()
152 else if (dev->vendor == PCI_VENDOR_ID_AMD && in init_chipset_amd74xx()
153 dev->device == PCI_DEVICE_ID_AMD_VIPER_7409) in init_chipset_amd74xx()
166 if (dev->vendor == PCI_VENDOR_ID_AMD && in init_chipset_amd74xx()
167 dev->device == PCI_DEVICE_ID_AMD_VIPER_7411) in init_chipset_amd74xx()
178 if ((amd_80w >> hwif->channel) & 1) in amd_cable_detect()
196 #define DECLARE_AMD_DEV(swdma, udma) \ argument
206 .udma_mask = udma, \
209 #define DECLARE_NV_DEV(udma) \ argument
219 .udma_mask = udma, \
237 u8 idx = id->driver_data; in amd74xx_probe()
245 if (dev->revision <= 7) in amd74xx_probe()
249 if (dev->subsystem_vendor == PCI_VENDOR_ID_AMD && in amd74xx_probe()
250 dev->subsystem_device == PCI_DEVICE_ID_AMD_SERENADE) in amd74xx_probe()
259 if (dev->vendor == PCI_VENDOR_ID_NVIDIA && in amd74xx_probe()
263 printk(KERN_INFO "%s %s: UDMA%s controller\n", in amd74xx_probe()
264 d.name, pci_name(dev), amd_dma[fls(d.udma_mask) - 1]); in amd74xx_probe()