]> git.hungrycats.org Git - linux/commitdiff
[PATCH] remove __ide_dma_count() and ide_hwif_t->ide_dma_count
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Mon, 16 Feb 2004 05:47:02 +0000 (21:47 -0800)
committerLinus Torvalds <torvalds@evo.osdl.org>
Mon, 16 Feb 2004 05:47:02 +0000 (21:47 -0800)
->ide_dma_count() was introduced in kernel 2.5.35 and was meant to add support
for host FIFO counters (for VDMA), but is only a wrapper for ->ide_dma_begin()
(even for siimage.c b/c SIIMAGE_VIRTUAL_DMAPIO is undefined).

Moreover it should be possible to add VDMA code directly to ->ide_dma_begin().

drivers/ide/arm/icside.c
drivers/ide/ide-dma.c
drivers/ide/ide.c
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/siimage.c
drivers/ide/pci/trm290.c
drivers/ide/ppc/pmac.c
include/linux/ide.h

index 09d3f9414e8f4665734aba1c61650d26c2609433..3d8cdcaa3a36de72d4e1d1b45bf76f9ec93ee59f 100644 (file)
@@ -428,11 +428,6 @@ static int icside_dma_begin(ide_drive_t *drive)
        return 0;
 }
 
-static int icside_dma_count(ide_drive_t *drive)
-{
-       return icside_dma_begin(drive);
-}
-
 /*
  * dma_intr() is the handler for disk read/write DMA interrupts
  */
@@ -653,7 +648,6 @@ static int icside_dma_init(ide_hwif_t *hwif)
        hwif->ide_dma_on        = icside_dma_on;
        hwif->ide_dma_read      = icside_dma_read;
        hwif->ide_dma_write     = icside_dma_write;
-       hwif->ide_dma_count     = icside_dma_count;
        hwif->ide_dma_begin     = icside_dma_begin;
        hwif->ide_dma_end       = icside_dma_end;
        hwif->ide_dma_test_irq  = icside_dma_test_irq;
index b934574f2f8e18adf89206977363aab2d8972588..2048af2952cf6d96257ed1111b2a5ea6ef13bae4 100644 (file)
@@ -662,7 +662,7 @@ int __ide_dma_read (ide_drive_t *drive /*, struct request *rq */)
 
        /* issue cmd to drive */
        ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry);
-       return HWIF(drive)->ide_dma_count(drive);
+       return hwif->ide_dma_begin(drive);
 }
 
 EXPORT_SYMBOL(__ide_dma_read);
@@ -694,7 +694,7 @@ int __ide_dma_write (ide_drive_t *drive /*, struct request *rq */)
        /* issue cmd to drive */
        ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry);
 
-       return HWIF(drive)->ide_dma_count(drive);
+       return hwif->ide_dma_begin(drive);
 }
 
 EXPORT_SYMBOL(__ide_dma_write);
@@ -791,17 +791,6 @@ int __ide_dma_good_drive (ide_drive_t *drive)
 EXPORT_SYMBOL(__ide_dma_good_drive);
 
 #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
-/*
- * Used for HOST FIFO counters for VDMA
- * PIO over DMA, effective ATA-Bridge operator.
- */
-int __ide_dma_count (ide_drive_t *drive)
-{
-       return HWIF(drive)->ide_dma_begin(drive);
-}
-
-EXPORT_SYMBOL(__ide_dma_count);
-
 int __ide_dma_verbose (ide_drive_t *drive)
 {
        struct hd_driveid *id   = drive->id;
@@ -1076,8 +1065,6 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
                hwif->ide_dma_read = &__ide_dma_read;
        if (!hwif->ide_dma_write)
                hwif->ide_dma_write = &__ide_dma_write;
-       if (!hwif->ide_dma_count)
-               hwif->ide_dma_count = &__ide_dma_count;
        if (!hwif->ide_dma_begin)
                hwif->ide_dma_begin = &__ide_dma_begin;
        if (!hwif->ide_dma_end)
index 7dee5ae9d2ac7995970f81fbb08dce323a4ef2ed..8054a12c17ec0b3ed6754837f67a4cd11df5cc13 100644 (file)
@@ -844,7 +844,6 @@ void ide_unregister (unsigned int index)
        hwif->ide_dma_test_irq          = old_hwif.ide_dma_test_irq;
        hwif->ide_dma_host_on           = old_hwif.ide_dma_host_on;
        hwif->ide_dma_host_off          = old_hwif.ide_dma_host_off;
-       hwif->ide_dma_count             = old_hwif.ide_dma_count;
        hwif->ide_dma_verbose           = old_hwif.ide_dma_verbose;
        hwif->ide_dma_lostirq           = old_hwif.ide_dma_lostirq;
        hwif->ide_dma_timeout           = old_hwif.ide_dma_timeout;
index 9579b225a3b33be4bcd003a257ce14573ab5c3cb..1466a3de8ec7c9d94b3dd9d8beef72bb49cbb1c6 100644 (file)
@@ -649,7 +649,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
        hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq;
        hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on;
        hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off;
-       hwif->ide_dma_count = &__ide_dma_count;
        hwif->ide_dma_verbose = &sgiioc4_ide_dma_verbose;
        hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
        hwif->ide_dma_timeout = &__ide_dma_timeout;
index 74521e43d6a0c2ae9c132f39ffcc9b30e6576e1d..04b0de07ec39dde610df3e7dd6307ef0c7bedd5e 100644 (file)
@@ -545,6 +545,7 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive)
        return 0;
 }
 
+#if 0
 /**
  *     siimage_mmio_ide_dma_count      -       DMA bytes done
  *     @drive
@@ -572,6 +573,7 @@ static int siimage_mmio_ide_dma_count (ide_drive_t *drive)
 #endif /* SIIMAGE_VIRTUAL_DMAPIO */
        return __ide_dma_count(drive);
 }
+#endif
 
 /**
  *     siimage_mmio_ide_dma_test_irq   -       check we caused an IRQ
@@ -1133,7 +1135,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
                hwif->udma_four = ata66_siimage(hwif);
 
        if (hwif->mmio) {
-               hwif->ide_dma_count = &siimage_mmio_ide_dma_count;
                hwif->ide_dma_test_irq = &siimage_mmio_ide_dma_test_irq;
                hwif->ide_dma_verbose = &siimage_mmio_ide_dma_verbose;
        } else {
index b1ed3605928d297ea76b95d2f1baf0b0f39ae04f..fa94f9b85c88008db9362a74ed50162a7db93f63 100644 (file)
@@ -225,7 +225,7 @@ static int trm290_ide_dma_write (ide_drive_t *drive /*, struct request *rq */)
 #endif
        /* issue cmd to drive */
        hwif->OUTB(command, IDE_COMMAND_REG);
-       return HWIF(drive)->ide_dma_count(drive);
+       return hwif->ide_dma_begin(drive);
 }
 
 static int trm290_ide_dma_read (ide_drive_t *drive  /*, struct request *rq */)
@@ -269,7 +269,7 @@ static int trm290_ide_dma_read (ide_drive_t *drive  /*, struct request *rq */)
 #endif
        /* issue cmd to drive */
        hwif->OUTB(command, IDE_COMMAND_REG);
-       return HWIF(drive)->ide_dma_count(drive);
+       return hwif->ide_dma_begin(drive);
 }
 
 static int trm290_ide_dma_begin (ide_drive_t *drive)
index 43d93b527a6dd9bcff42d14cd46ccda2a6b75a28..bf4f9bcd66ba9a4604f571ce1b82ac2d91c38737 100644 (file)
@@ -1988,12 +1988,6 @@ pmac_ide_dma_write (ide_drive_t *drive)
        return pmac_ide_dma_begin(drive);
 }
 
-static int __pmac
-pmac_ide_dma_count (ide_drive_t *drive)
-{
-       return HWIF(drive)->ide_dma_begin(drive);
-}
-
 /*
  * Kick the DMA controller into life after the DMA command has been issued
  * to the drive.
@@ -2165,7 +2159,6 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
        hwif->ide_dma_check = &pmac_ide_dma_check;
        hwif->ide_dma_read = &pmac_ide_dma_read;
        hwif->ide_dma_write = &pmac_ide_dma_write;
-       hwif->ide_dma_count = &pmac_ide_dma_count;
        hwif->ide_dma_begin = &pmac_ide_dma_begin;
        hwif->ide_dma_end = &pmac_ide_dma_end;
        hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq;
index 1c75a4f3c8b624588908d98e0af42d610a36ea31..69db00c97a669d63efee3d440750627d37aab2ab 100644 (file)
@@ -795,7 +795,6 @@ typedef struct ide_dma_ops_s {
        int (*ide_dma_test_irq)(ide_drive_t *drive);
        int (*ide_dma_host_on)(ide_drive_t *drive);
        int (*ide_dma_host_off)(ide_drive_t *drive);
-       int (*ide_dma_count)(ide_drive_t *drive);
        int (*ide_dma_verbose)(ide_drive_t *drive);
        int (*ide_dma_lostirq)(ide_drive_t *drive);
        int (*ide_dma_timeout)(ide_drive_t *drive);
@@ -932,7 +931,6 @@ typedef struct hwif_s {
        int (*ide_dma_test_irq)(ide_drive_t *drive);
        int (*ide_dma_host_on)(ide_drive_t *drive);
        int (*ide_dma_host_off)(ide_drive_t *drive);
-       int (*ide_dma_count)(ide_drive_t *drive);
        int (*ide_dma_verbose)(ide_drive_t *drive);
        int (*ide_dma_lostirq)(ide_drive_t *drive);
        int (*ide_dma_timeout)(ide_drive_t *drive);
@@ -1618,7 +1616,6 @@ extern int __ide_dma_write(ide_drive_t *);
 extern int __ide_dma_begin(ide_drive_t *);
 extern int __ide_dma_end(ide_drive_t *);
 extern int __ide_dma_test_irq(ide_drive_t *);
-extern int __ide_dma_count(ide_drive_t *);
 extern int __ide_dma_verbose(ide_drive_t *);
 extern int __ide_dma_lostirq(ide_drive_t *);
 extern int __ide_dma_timeout(ide_drive_t *);