aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/pdc202xx_new.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 65b1e124edf7..cc0bfdcf1f19 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -228,38 +228,11 @@ static u8 pdcnew_cable_detect(ide_hwif_t *hwif)
228 return get_indexed_reg(hwif, 0x0b) & 0x04; 228 return get_indexed_reg(hwif, 0x0b) & 0x04;
229} 229}
230 230
231static int config_chipset_for_dma(ide_drive_t *drive)
232{
233 struct hd_driveid *id = drive->id;
234 ide_hwif_t *hwif = HWIF(drive);
235 u8 speed;
236
237 if (id->capability & 4) {
238 /*
239 * Set IORDY_EN & PREFETCH_EN (this seems to have
240 * NO real effect since this register is reloaded
241 * by hardware when the transfer mode is selected)
242 */
243 u8 tmp, adj = (drive->dn & 1) ? 0x08 : 0x00;
244
245 tmp = get_indexed_reg(hwif, 0x13 + adj);
246 set_indexed_reg(hwif, 0x13 + adj, tmp | 0x03);
247 }
248
249 speed = ide_max_dma_mode(drive);
250
251 if (!speed)
252 return 0;
253
254 (void) hwif->speedproc(drive, speed);
255 return ide_dma_enable(drive);
256}
257
258static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive) 231static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive)
259{ 232{
260 drive->init_speed = 0; 233 drive->init_speed = 0;
261 234
262 if (ide_use_dma(drive) && config_chipset_for_dma(drive)) 235 if (ide_tune_dma(drive))
263 return 0; 236 return 0;
264 237
265 if (ide_use_fast_pio(drive)) 238 if (ide_use_fast_pio(drive))