Lines Matching +full:ultra +full:- +full:low
2 * pata_ali.c - ALI 15x3 PATA for new ATA layer
8 * Copyright (C) 1998-2000 Michel Aubry, Maintainer
9 * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer
10 * Copyright (C) 1999-2000 CJ, cjtsai@ali.com.tw, Maintainer
12 * Copyright (C) 1998-2000 Andre Hedrick (andre@linux-ide.org)
54 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
55 DMI_MATCH(DMI_BOARD_VERSION, "OmniBook N32N-736"),
59 .ident = "Toshiba Satellite S1800-814",
62 DMI_MATCH(DMI_PRODUCT_NAME, "S1800-814"),
71 if (pdev->subsystem_vendor == 0x10CF && pdev->subsystem_device == 0x10AF) in ali_cable_override()
73 /* Mitac 8317 (Winbook-A) and relatives */ in ali_cable_override()
74 if (pdev->subsystem_vendor == 0x1071 && pdev->subsystem_device == 0x8317) in ali_cable_override()
83 * ali_c2_cable_detect - cable detection
91 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in ali_c2_cable_detect()
103 if (ata66 & (1 << ap->port_no)) in ali_c2_cable_detect()
110 * ali_20_filter - filter for earlier ALI DMA
122 if (adev->class != ATA_DEV_ATA) in ali_20_filter()
124 ata_id_c_string(adev->id, model_num, ATA_ID_PROD, sizeof(model_num)); in ali_20_filter()
131 * ali_fifo_control - FIFO manager
143 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in ali_fifo_control()
144 int pio_fifo = 0x54 + ap->port_no; in ali_fifo_control()
146 int shift = 4 * adev->devno; in ali_fifo_control()
148 /* ATA - FIFO on set nibble to 0x05, ATAPI - FIFO off, set nibble to in ali_fifo_control()
159 * ali_program_modes - load mode registers
163 * @ultra: UDMA timing or zero for off
166 * ultra is zero. If ultra is set then load and enable the UDMA
170 …oid ali_program_modes(struct ata_port *ap, struct ata_device *adev, struct ata_timing *t, u8 ultra) in ali_program_modes() argument
172 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in ali_program_modes()
173 int cas = 0x58 + 4 * ap->port_no; /* Command timing */ in ali_program_modes()
174 int cbt = 0x59 + 4 * ap->port_no; /* Command timing */ in ali_program_modes()
175 int drwt = 0x5A + 4 * ap->port_no + adev->devno; /* R/W timing */ in ali_program_modes()
176 int udmat = 0x56 + ap->port_no; /* UDMA timing */ in ali_program_modes()
177 int shift = 4 * adev->devno; in ali_program_modes()
181 t->setup = clamp_val(t->setup, 1, 8) & 7; in ali_program_modes()
182 t->act8b = clamp_val(t->act8b, 1, 8) & 7; in ali_program_modes()
183 t->rec8b = clamp_val(t->rec8b, 1, 16) & 15; in ali_program_modes()
184 t->active = clamp_val(t->active, 1, 8) & 7; in ali_program_modes()
185 t->recover = clamp_val(t->recover, 1, 16) & 15; in ali_program_modes()
187 pci_write_config_byte(pdev, cas, t->setup); in ali_program_modes()
188 pci_write_config_byte(pdev, cbt, (t->act8b << 4) | t->rec8b); in ali_program_modes()
189 pci_write_config_byte(pdev, drwt, (t->active << 4) | t->recover); in ali_program_modes()
195 udma |= ultra << shift; in ali_program_modes()
200 * ali_set_piomode - set initial PIO mode data
213 ata_timing_compute(adev, adev->pio_mode, &t, T, 1); in ali_set_piomode()
216 ata_timing_compute(pair, pair->pio_mode, &p, T, 1); in ali_set_piomode()
219 ata_timing_compute(pair, pair->dma_mode, &p, T, 1); in ali_set_piomode()
225 if (adev->class != ATA_DEV_ATA) in ali_set_piomode()
228 if (adev->class == ATA_DEV_ATA) in ali_set_piomode()
234 * ali_set_dmamode - set initial DMA mode data
247 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in ali_set_dmamode()
250 if (adev->class == ATA_DEV_ATA) in ali_set_dmamode()
253 if (adev->dma_mode >= XFER_UDMA_0) { in ali_set_dmamode()
254 ali_program_modes(ap, adev, NULL, udma_timing[adev->dma_mode - XFER_UDMA_0]); in ali_set_dmamode()
255 if (adev->dma_mode >= XFER_UDMA_3) { in ali_set_dmamode()
262 ata_timing_compute(adev, adev->dma_mode, &t, T, 1); in ali_set_dmamode()
265 ata_timing_compute(pair, pair->pio_mode, &p, T, 1); in ali_set_dmamode()
268 ata_timing_compute(pair, pair->dma_mode, &p, T, 1); in ali_set_dmamode()
277 * ali_warn_atapi_dma - Warn about ATAPI DMA disablement
281 * Can be used as ->dev_config.
286 struct ata_eh_context *ehc = &adev->link->eh_context; in ali_warn_atapi_dma()
287 int print_info = ehc->i.flags & ATA_EHI_PRINTINFO; in ali_warn_atapi_dma()
289 if (print_info && adev->class == ATA_DEV_ATAPI && !ali_atapi_dma) { in ali_warn_atapi_dma()
298 * ali_lock_sectors - Keep older devices to 255 sector mode
310 adev->max_sectors = 255; in ali_lock_sectors()
315 * ali_check_atapi_dma - DMA check for most ALi controllers
328 * linux-ide@vger.kernel.org and cc htejun@gmail.com. in ali_check_atapi_dma()
332 return -EOPNOTSUPP; in ali_check_atapi_dma()
336 if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC) in ali_check_atapi_dma()
337 return -EOPNOTSUPP; in ali_check_atapi_dma()
344 int port_bit = 4 << link->ap->port_no; in ali_c2_c3_postreset()
348 /* Tristate and re-enable the bus signals */ in ali_c2_c3_postreset()
424 * ali_init_chipset - chip setup function
441 if (pdev->revision <= 0x20) { in ali_init_chipset()
449 if (pdev->revision < 0xC2) in ali_init_chipset()
450 /* 1543-E/F, 1543C-C, 1543C-D, 1543C-E */ in ali_init_chipset()
451 /* Clear CD-ROM DMA write bit */ in ali_init_chipset()
454 if (pdev->revision >= 0xc2) in ali_init_chipset()
459 * to use PIO. 0x53 bit 1 (rev 20 only) - enable FIFO control in ali_init_chipset()
463 if (pdev->revision >= 0xc7) in ali_init_chipset()
469 north = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus), 0, in ali_init_chipset()
471 if (north && north->vendor == PCI_VENDOR_ID_AL && ali_isa_bridge) { in ali_init_chipset()
475 if (pdev->revision == 0xC2) in ali_init_chipset()
477 else if (pdev->revision > 0xC2 && pdev->revision < 0xC5) in ali_init_chipset()
484 * ali_init_one - discovery callback
565 if (pdev->revision < 0x20) { in ali_init_one()
567 } else if (pdev->revision < 0xC2) { in ali_init_one()
569 } else if (pdev->revision == 0xC2) { in ali_init_one()
571 } else if (pdev->revision == 0xC3) { in ali_init_one()
573 } else if (pdev->revision == 0xC4) { in ali_init_one()
580 if (ali_isa_bridge && pdev->revision >= 0x20 && pdev->revision < 0xC2) { in ali_init_one()
587 if (!ppi[0]->mwdma_mask && !ppi[0]->udma_mask) in ali_init_one()
646 MODULE_DESCRIPTION("low-level driver for ALi PATA");