Use I/O ops directly in ide_dma_host_set(), ide_dma_setup(),
ide_dma_start() and __ide_dma_end().
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>[...]
Index: b/drivers/ide/ide-dma.c[...]
===================================================================
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -376,7 +376,10 @@ void ide_dma_host_set(ide_drive_t *drive
else
dma_stat &= ~(1 << (5 + unit));
- hwif->OUTB(dma_stat, hwif->dma_status);
+ if (hwif->host_flags & IDE_HFLAG_MMIO)
+ writeb(dma_stat, (void __iomem *)hwif->dma_status);
+ else
+ outb(dma_stat, hwif->dma_status);
}
EXPORT_SYMBOL_GPL(ide_dma_host_set);
@@ -470,13 +474,20 @@ int ide_dma_setup(ide_drive_t *drive)
/* read DMA status for INTR & ERROR flags */[...]
dma_stat = hwif->read_sff_dma_status(hwif);
/* clear INTR & ERROR flags */
- hwif->OUTB(dma_stat|6, hwif->dma_status);
+ if (mmio)
+ writeb(dma_stat | 6, (void __iomem *)hwif->dma_status);
+ else
+ outb(dma_stat | 6, hwif->dma_status);
+
drive->waiting_for_dma = 1;
return 0;
}
@@ -511,18 +529,31 @@ EXPORT_SYMBOL_GPL(ide_dma_start);
/* get DMA status */
dma_stat = hwif->read_sff_dma_status(hwif);
- /* clear the INTR & ERROR bits */
- hwif->OUTB(dma_stat|6, hwif->dma_status);
+
+ if (mmio)
+ /* clear the INTR & ERROR bits */
+ writeb(dma_stat | 6, (void __iomem *)hwif->dma_status);
+ else
+ outb(dma_stat | 6, hwif->dma_status);
+