summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-16 00:51:43 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-05-16 00:51:43 +0200
commit7f86723a60d287be19aee620277184f9f5455283 (patch)
treed2f38cf03a6b6310ec662add2bbca9d8fdd42bb6
parent38ff8a74e8f015f94289b84cd6572a68c3431cdd (diff)
downloadblackbird-op-linux-7f86723a60d287be19aee620277184f9f5455283.tar.gz
blackbird-op-linux-7f86723a60d287be19aee620277184f9f5455283.zip
pdc202xx_new: use ide_tune_dma()
* remove code enabling IORDY and prefetch from config_chipset_for_dma(), as the comment states it has no real effect because these settings are overriden when the PIO mode is set (and for this driver ->autotune == 1 so PIO mode is always programmed) * use ide_tune_dma() in pdcnew_config_drive_xfer_rate() and remove no longer needed config_chipset_for_dma() There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-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)
return get_indexed_reg(hwif, 0x0b) & 0x04;
}
-static int config_chipset_for_dma(ide_drive_t *drive)
-{
- struct hd_driveid *id = drive->id;
- ide_hwif_t *hwif = HWIF(drive);
- u8 speed;
-
- if (id->capability & 4) {
- /*
- * Set IORDY_EN & PREFETCH_EN (this seems to have
- * NO real effect since this register is reloaded
- * by hardware when the transfer mode is selected)
- */
- u8 tmp, adj = (drive->dn & 1) ? 0x08 : 0x00;
-
- tmp = get_indexed_reg(hwif, 0x13 + adj);
- set_indexed_reg(hwif, 0x13 + adj, tmp | 0x03);
- }
-
- speed = ide_max_dma_mode(drive);
-
- if (!speed)
- return 0;
-
- (void) hwif->speedproc(drive, speed);
- return ide_dma_enable(drive);
-}
-
static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive)
{
drive->init_speed = 0;
- if (ide_use_dma(drive) && config_chipset_for_dma(drive))
+ if (ide_tune_dma(drive))
return 0;
if (ide_use_fast_pio(drive))
OpenPOWER on IntegriCloud