aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-dma.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 77506fec1fbd..31a71136bbae 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -838,37 +838,17 @@ static int ide_allocate_dma_engine(ide_hwif_t *hwif)
838 return 1; 838 return 1;
839} 839}
840 840
841static int ide_mapped_mmio_dma(ide_hwif_t *hwif, unsigned long base)
842{
843 printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);
844
845 return 0;
846}
847
848static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base)
849{
850 printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
851 hwif->name, base, base + 7);
852
853 hwif->extra_base = base + (hwif->channel ? 8 : 16);
854
855 return 0;
856}
857
858static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base)
859{
860 if (hwif->mmio)
861 return ide_mapped_mmio_dma(hwif, base);
862
863 return ide_iomio_dma(hwif, base);
864}
865
866void ide_setup_dma(ide_hwif_t *hwif, unsigned long base) 841void ide_setup_dma(ide_hwif_t *hwif, unsigned long base)
867{ 842{
868 u8 dma_stat; 843 u8 dma_stat;
869 844
870 if (ide_dma_iobase(hwif, base)) 845 if (hwif->mmio)
871 return; 846 printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);
847 else
848 printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
849 hwif->name, base, base + 7);
850
851 hwif->extra_base = base + (hwif->channel ? 8 : 16);
872 852
873 if (ide_allocate_dma_engine(hwif)) { 853 if (ide_allocate_dma_engine(hwif)) {
874 ide_release_dma_engine(hwif); 854 ide_release_dma_engine(hwif);