aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/arm/icside.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/arm/icside.c')
-rw-r--r--drivers/ide/arm/icside.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 7912a471f10d..110e52377c71 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -313,41 +313,10 @@ static int icside_dma_on(ide_drive_t *drive)
313 313
314static int icside_dma_check(ide_drive_t *drive) 314static int icside_dma_check(ide_drive_t *drive)
315{ 315{
316 struct hd_driveid *id = drive->id; 316 if (ide_tune_dma(drive))
317 ide_hwif_t *hwif = HWIF(drive); 317 return 0;
318 int xfer_mode = 0;
319
320 if (!(id->capability & 1) || !hwif->autodma)
321 goto out;
322
323 /*
324 * Consult the list of known "bad" drives
325 */
326 if (__ide_dma_bad_drive(drive))
327 goto out;
328
329 /*
330 * Enable DMA on any drive that has multiword DMA
331 */
332 if (id->field_valid & 2) {
333 xfer_mode = ide_max_dma_mode(drive);
334 goto out;
335 }
336
337 /*
338 * Consult the list of known "good" drives
339 */
340 if (__ide_dma_good_drive(drive)) {
341 if (id->eide_dma_time > 150)
342 goto out;
343 xfer_mode = XFER_MW_DMA_1;
344 }
345
346out:
347 if (xfer_mode == 0)
348 return -1;
349 318
350 return icside_set_speed(drive, xfer_mode) ? -1 : 0; 319 return -1;
351} 320}
352 321
353static int icside_dma_end(ide_drive_t *drive) 322static int icside_dma_end(ide_drive_t *drive)