aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ppc/pmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r--drivers/ide/ppc/pmac.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 24f73291c4d5..a1d24cd1293e 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1593,24 +1593,10 @@ pmac_ide_destroy_dmatable (ide_drive_t *drive)
1593static int 1593static int
1594pmac_ide_dma_check(ide_drive_t *drive) 1594pmac_ide_dma_check(ide_drive_t *drive)
1595{ 1595{
1596 int enable = 1; 1596 if (ide_tune_dma(drive))
1597 return 0;
1597 1598
1598 drive->using_dma = 0; 1599 return -1;
1599
1600 if (drive->media == ide_floppy)
1601 enable = 0;
1602 if ((drive->id->capability & 1) == 0 && !__ide_dma_good_drive(drive))
1603 enable = 0;
1604 if (__ide_dma_bad_drive(drive))
1605 enable = 0;
1606
1607 if (enable) {
1608 u8 mode = ide_max_dma_mode(drive);
1609
1610 if (mode && pmac_ide_tune_chipset(drive, mode) == 0)
1611 drive->using_dma = 1;
1612 }
1613 return 0;
1614} 1600}
1615 1601
1616/* 1602/*
@@ -1844,7 +1830,10 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1844 hwif->mwdma_mask = 0x07; 1830 hwif->mwdma_mask = 0x07;
1845 hwif->swdma_mask = 0x00; 1831 hwif->swdma_mask = 0x00;
1846 break; 1832 break;
1847 } 1833 }
1834
1835 hwif->autodma = 1;
1836 hwif->drives[1].autodma = hwif->drives[0].autodma = hwif->autodma;
1848} 1837}
1849 1838
1850#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 1839#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */