Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / drivers / ide / ide-dma.c
index 767820d..7ee44f8 100644 (file)
@@ -463,10 +463,11 @@ int ide_dma_setup(ide_drive_t *drive)
        }
 
        /* PRD table */
-       if (hwif->mmio)
-               writel(hwif->dmatable_dma, (void __iomem *)hwif->dma_prdtable);
+       if (hwif->host_flags & IDE_HFLAG_MMIO)
+               writel(hwif->dmatable_dma,
+                      (void __iomem *)(hwif->dma_base + ATA_DMA_TABLE_OFS));
        else
-               outl(hwif->dmatable_dma, hwif->dma_prdtable);
+               outl(hwif->dmatable_dma, hwif->dma_base + ATA_DMA_TABLE_OFS);
 
        /* specify r/w */
        hwif->OUTB(reading, hwif->dma_command);
@@ -691,7 +692,7 @@ static int ide_tune_dma(ide_drive_t *drive)
        ide_hwif_t *hwif = drive->hwif;
        u8 speed;
 
-       if (noautodma || drive->nodma || (drive->id->capability & 1) == 0)
+       if (drive->nodma || (drive->id->capability & 1) == 0)
                return 0;
 
        /* consult the list of known "bad" drives */
@@ -860,8 +861,6 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
                hwif->dma_command       = hwif->dma_base + 0;
        if (!hwif->dma_status)
                hwif->dma_status        = hwif->dma_base + 2;
-       if (!hwif->dma_prdtable)
-               hwif->dma_prdtable      = hwif->dma_base + 4;
 
        hwif->dma_ops = &sff_dma_ops;
 }