diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:24 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:24 -0400 |
commit | 5e37bdc081a980dd0d669e6387bcf15ca9666f81 (patch) | |
tree | d842166c3bd23fbf3dfba0ccaa0f9ed5cc3096db /drivers/ide/ide-iops.c | |
parent | 1fd1890594bd355a4217f5658a34763e77decee3 (diff) |
ide: add struct ide_dma_ops (take 3)
Add struct ide_dma_ops and convert core code + drivers to use it.
While at it:
* Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods.
* Drop "ide_" "infixes" from DMA methods.
* au1xxx-ide.c:
- use auide_dma_{test_irq,end}() directly in auide_dma_timeout()
* pdc202xx_old.c:
- drop "old_" "infixes" from DMA methods
* siimage.c:
- add siimage_dma_test_irq() helper
- print SATA warning in siimage_init_one()
* Remove no longer needed ->init_hwif implementations.
v2:
* Changes based on review from Sergei:
- s/siimage_ide_dma_test_irq/siimage_dma_test_irq/
- s/drive->hwif/hwif/ in idefloppy_pc_intr().
- fix patch description w.r.t. au1xxx-ide changes
- fix au1xxx-ide build
- fix naming for cmd64*_dma_ops
- drop "ide_" and "old_" infixes
- s/hpt3xxx_dma_ops/hpt37x_dma_ops/
- s/hpt370x_dma_ops/hpt370_dma_ops/
- use correct DMA ops for HPT302/N, HPT371/N and HPT374
- s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/
v3:
* Two bugs slipped in v2 (noticed by Sergei):
- use correct DMA ops for HPT374 (for real this time)
- handle HPT370/HPT370A properly
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index bfec5d066b25..9c646bd63549 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -432,7 +432,7 @@ int drive_is_ready (ide_drive_t *drive) | |||
432 | u8 stat = 0; | 432 | u8 stat = 0; |
433 | 433 | ||
434 | if (drive->waiting_for_dma) | 434 | if (drive->waiting_for_dma) |
435 | return hwif->ide_dma_test_irq(drive); | 435 | return hwif->dma_ops->dma_test_irq(drive); |
436 | 436 | ||
437 | #if 0 | 437 | #if 0 |
438 | /* need to guarantee 400ns since last command was issued */ | 438 | /* need to guarantee 400ns since last command was issued */ |
@@ -703,8 +703,8 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
703 | // msleep(50); | 703 | // msleep(50); |
704 | 704 | ||
705 | #ifdef CONFIG_BLK_DEV_IDEDMA | 705 | #ifdef CONFIG_BLK_DEV_IDEDMA |
706 | if (hwif->dma_host_set) /* check if host supports DMA */ | 706 | if (hwif->dma_ops) /* check if host supports DMA */ |
707 | hwif->dma_host_set(drive, 0); | 707 | hwif->dma_ops->dma_host_set(drive, 0); |
708 | #endif | 708 | #endif |
709 | 709 | ||
710 | /* Skip setting PIO flow-control modes on pre-EIDE drives */ | 710 | /* Skip setting PIO flow-control modes on pre-EIDE drives */ |
@@ -762,8 +762,8 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
762 | #ifdef CONFIG_BLK_DEV_IDEDMA | 762 | #ifdef CONFIG_BLK_DEV_IDEDMA |
763 | if ((speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA)) && | 763 | if ((speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA)) && |
764 | drive->using_dma) | 764 | drive->using_dma) |
765 | hwif->dma_host_set(drive, 1); | 765 | hwif->dma_ops->dma_host_set(drive, 1); |
766 | else if (hwif->dma_host_set) /* check if host supports DMA */ | 766 | else if (hwif->dma_ops) /* check if host supports DMA */ |
767 | ide_dma_off_quietly(drive); | 767 | ide_dma_off_quietly(drive); |
768 | #endif | 768 | #endif |
769 | 769 | ||