diff options
-rw-r--r-- | drivers/ide/arm/palm_bk3710.c | 7 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 12 | ||||
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 4 | ||||
-rw-r--r-- | drivers/ide/pci/hpt366.c | 4 | ||||
-rw-r--r-- | drivers/ide/setup-pci.c | 4 | ||||
-rw-r--r-- | include/linux/ide.h | 2 |
6 files changed, 15 insertions, 18 deletions
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 023c10753f15..0229d794d909 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c | |||
@@ -316,15 +316,14 @@ static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif) | |||
316 | static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif, | 316 | static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif, |
317 | const struct ide_port_info *d) | 317 | const struct ide_port_info *d) |
318 | { | 318 | { |
319 | unsigned long base = | ||
320 | hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET; | ||
321 | |||
322 | printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); | 319 | printk(KERN_INFO " %s: MMIO-DMA\n", hwif->name); |
323 | 320 | ||
324 | if (ide_allocate_dma_engine(hwif)) | 321 | if (ide_allocate_dma_engine(hwif)) |
325 | return -1; | 322 | return -1; |
326 | 323 | ||
327 | ide_setup_dma(hwif, base); | 324 | hwif->dma_base = hwif->io_ports.data_addr - IDE_PALM_ATA_PRI_REG_OFFSET; |
325 | |||
326 | hwif->dma_ops = &sff_dma_ops; | ||
328 | 327 | ||
329 | return 0; | 328 | return 0; |
330 | } | 329 | } |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index d98a9da2699c..ac342ebf6c54 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -878,7 +878,7 @@ int ide_allocate_dma_engine(ide_hwif_t *hwif) | |||
878 | } | 878 | } |
879 | EXPORT_SYMBOL_GPL(ide_allocate_dma_engine); | 879 | EXPORT_SYMBOL_GPL(ide_allocate_dma_engine); |
880 | 880 | ||
881 | static const struct ide_dma_ops sff_dma_ops = { | 881 | const struct ide_dma_ops sff_dma_ops = { |
882 | .dma_host_set = ide_dma_host_set, | 882 | .dma_host_set = ide_dma_host_set, |
883 | .dma_setup = ide_dma_setup, | 883 | .dma_setup = ide_dma_setup, |
884 | .dma_exec_cmd = ide_dma_exec_cmd, | 884 | .dma_exec_cmd = ide_dma_exec_cmd, |
@@ -888,13 +888,5 @@ static const struct ide_dma_ops sff_dma_ops = { | |||
888 | .dma_timeout = ide_dma_timeout, | 888 | .dma_timeout = ide_dma_timeout, |
889 | .dma_lost_irq = ide_dma_lost_irq, | 889 | .dma_lost_irq = ide_dma_lost_irq, |
890 | }; | 890 | }; |
891 | 891 | EXPORT_SYMBOL_GPL(sff_dma_ops); | |
892 | void ide_setup_dma(ide_hwif_t *hwif, unsigned long base) | ||
893 | { | ||
894 | hwif->dma_base = base; | ||
895 | |||
896 | hwif->dma_ops = &sff_dma_ops; | ||
897 | } | ||
898 | |||
899 | EXPORT_SYMBOL_GPL(ide_setup_dma); | ||
900 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ | 892 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 80d19c0eb780..8015f6f65488 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -483,7 +483,9 @@ static int __devinit init_dma_ali15x3(ide_hwif_t *hwif, | |||
483 | if (ide_allocate_dma_engine(hwif)) | 483 | if (ide_allocate_dma_engine(hwif)) |
484 | return -1; | 484 | return -1; |
485 | 485 | ||
486 | ide_setup_dma(hwif, base); | 486 | hwif->dma_base = base; |
487 | |||
488 | hwif->dma_ops = &sff_dma_ops; | ||
487 | 489 | ||
488 | return 0; | 490 | return 0; |
489 | } | 491 | } |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index d2f470ec8055..201e5ddae921 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1346,7 +1346,9 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif, | |||
1346 | if (ide_allocate_dma_engine(hwif)) | 1346 | if (ide_allocate_dma_engine(hwif)) |
1347 | return -1; | 1347 | return -1; |
1348 | 1348 | ||
1349 | ide_setup_dma(hwif, base); | 1349 | hwif->dma_base = base; |
1350 | |||
1351 | hwif->dma_ops = &sff_dma_ops; | ||
1350 | 1352 | ||
1351 | return 0; | 1353 | return 0; |
1352 | } | 1354 | } |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index acb467c6f345..b047013f3652 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -377,7 +377,9 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
377 | if (ide_allocate_dma_engine(hwif)) | 377 | if (ide_allocate_dma_engine(hwif)) |
378 | return -1; | 378 | return -1; |
379 | 379 | ||
380 | ide_setup_dma(hwif, base); | 380 | hwif->dma_base = base; |
381 | |||
382 | hwif->dma_ops = &sff_dma_ops; | ||
381 | } | 383 | } |
382 | 384 | ||
383 | return 0; | 385 | return 0; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 85a32f472ef0..6d774607e32a 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1007,6 +1007,7 @@ void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | |||
1007 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1007 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
1008 | int ide_pci_set_master(struct pci_dev *, const char *); | 1008 | int ide_pci_set_master(struct pci_dev *, const char *); |
1009 | unsigned long ide_pci_dma_base(ide_hwif_t *, const struct ide_port_info *); | 1009 | unsigned long ide_pci_dma_base(ide_hwif_t *, const struct ide_port_info *); |
1010 | extern const struct ide_dma_ops sff_dma_ops; | ||
1010 | int ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); | 1011 | int ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); |
1011 | #else | 1012 | #else |
1012 | static inline int ide_hwif_setup_dma(ide_hwif_t *hwif, | 1013 | static inline int ide_hwif_setup_dma(ide_hwif_t *hwif, |
@@ -1164,7 +1165,6 @@ void ide_destroy_dmatable(ide_drive_t *); | |||
1164 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1165 | extern int ide_build_dmatable(ide_drive_t *, struct request *); |
1165 | int ide_allocate_dma_engine(ide_hwif_t *); | 1166 | int ide_allocate_dma_engine(ide_hwif_t *); |
1166 | void ide_release_dma_engine(ide_hwif_t *); | 1167 | void ide_release_dma_engine(ide_hwif_t *); |
1167 | void ide_setup_dma(ide_hwif_t *, unsigned long); | ||
1168 | 1168 | ||
1169 | void ide_dma_host_set(ide_drive_t *, int); | 1169 | void ide_dma_host_set(ide_drive_t *, int); |
1170 | extern int ide_dma_setup(ide_drive_t *); | 1170 | extern int ide_dma_setup(ide_drive_t *); |