Commit 22e84a6b authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] remove __ide_dma_count() and ide_hwif_t->ide_dma_count

->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().
parent 6e14119e
...@@ -428,11 +428,6 @@ static int icside_dma_begin(ide_drive_t *drive) ...@@ -428,11 +428,6 @@ static int icside_dma_begin(ide_drive_t *drive)
return 0; 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 * dma_intr() is the handler for disk read/write DMA interrupts
*/ */
...@@ -653,7 +648,6 @@ static int icside_dma_init(ide_hwif_t *hwif) ...@@ -653,7 +648,6 @@ static int icside_dma_init(ide_hwif_t *hwif)
hwif->ide_dma_on = icside_dma_on; hwif->ide_dma_on = icside_dma_on;
hwif->ide_dma_read = icside_dma_read; hwif->ide_dma_read = icside_dma_read;
hwif->ide_dma_write = icside_dma_write; hwif->ide_dma_write = icside_dma_write;
hwif->ide_dma_count = icside_dma_count;
hwif->ide_dma_begin = icside_dma_begin; hwif->ide_dma_begin = icside_dma_begin;
hwif->ide_dma_end = icside_dma_end; hwif->ide_dma_end = icside_dma_end;
hwif->ide_dma_test_irq = icside_dma_test_irq; hwif->ide_dma_test_irq = icside_dma_test_irq;
......
...@@ -662,7 +662,7 @@ int __ide_dma_read (ide_drive_t *drive /*, struct request *rq */) ...@@ -662,7 +662,7 @@ int __ide_dma_read (ide_drive_t *drive /*, struct request *rq */)
/* issue cmd to drive */ /* issue cmd to drive */
ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry); 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); EXPORT_SYMBOL(__ide_dma_read);
...@@ -694,7 +694,7 @@ int __ide_dma_write (ide_drive_t *drive /*, struct request *rq */) ...@@ -694,7 +694,7 @@ int __ide_dma_write (ide_drive_t *drive /*, struct request *rq */)
/* issue cmd to drive */ /* issue cmd to drive */
ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry); 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); EXPORT_SYMBOL(__ide_dma_write);
...@@ -791,17 +791,6 @@ int __ide_dma_good_drive (ide_drive_t *drive) ...@@ -791,17 +791,6 @@ int __ide_dma_good_drive (ide_drive_t *drive)
EXPORT_SYMBOL(__ide_dma_good_drive); EXPORT_SYMBOL(__ide_dma_good_drive);
#ifdef CONFIG_BLK_DEV_IDEDMA_PCI #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) int __ide_dma_verbose (ide_drive_t *drive)
{ {
struct hd_driveid *id = drive->id; 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 ...@@ -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; hwif->ide_dma_read = &__ide_dma_read;
if (!hwif->ide_dma_write) if (!hwif->ide_dma_write)
hwif->ide_dma_write = &__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) if (!hwif->ide_dma_begin)
hwif->ide_dma_begin = &__ide_dma_begin; hwif->ide_dma_begin = &__ide_dma_begin;
if (!hwif->ide_dma_end) if (!hwif->ide_dma_end)
......
...@@ -844,7 +844,6 @@ void ide_unregister (unsigned int index) ...@@ -844,7 +844,6 @@ void ide_unregister (unsigned int index)
hwif->ide_dma_test_irq = old_hwif.ide_dma_test_irq; 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_on = old_hwif.ide_dma_host_on;
hwif->ide_dma_host_off = old_hwif.ide_dma_host_off; 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_verbose = old_hwif.ide_dma_verbose;
hwif->ide_dma_lostirq = old_hwif.ide_dma_lostirq; hwif->ide_dma_lostirq = old_hwif.ide_dma_lostirq;
hwif->ide_dma_timeout = old_hwif.ide_dma_timeout; hwif->ide_dma_timeout = old_hwif.ide_dma_timeout;
......
...@@ -649,7 +649,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif) ...@@ -649,7 +649,6 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq;
hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on; hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on;
hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; 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_verbose = &sgiioc4_ide_dma_verbose;
hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
hwif->ide_dma_timeout = &__ide_dma_timeout; hwif->ide_dma_timeout = &__ide_dma_timeout;
......
...@@ -545,6 +545,7 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive) ...@@ -545,6 +545,7 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive)
return 0; return 0;
} }
#if 0
/** /**
* siimage_mmio_ide_dma_count - DMA bytes done * siimage_mmio_ide_dma_count - DMA bytes done
* @drive * @drive
...@@ -572,6 +573,7 @@ static int siimage_mmio_ide_dma_count (ide_drive_t *drive) ...@@ -572,6 +573,7 @@ static int siimage_mmio_ide_dma_count (ide_drive_t *drive)
#endif /* SIIMAGE_VIRTUAL_DMAPIO */ #endif /* SIIMAGE_VIRTUAL_DMAPIO */
return __ide_dma_count(drive); return __ide_dma_count(drive);
} }
#endif
/** /**
* siimage_mmio_ide_dma_test_irq - check we caused an IRQ * 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) ...@@ -1133,7 +1135,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
hwif->udma_four = ata66_siimage(hwif); hwif->udma_four = ata66_siimage(hwif);
if (hwif->mmio) { 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_test_irq = &siimage_mmio_ide_dma_test_irq;
hwif->ide_dma_verbose = &siimage_mmio_ide_dma_verbose; hwif->ide_dma_verbose = &siimage_mmio_ide_dma_verbose;
} else { } else {
......
...@@ -225,7 +225,7 @@ static int trm290_ide_dma_write (ide_drive_t *drive /*, struct request *rq */) ...@@ -225,7 +225,7 @@ static int trm290_ide_dma_write (ide_drive_t *drive /*, struct request *rq */)
#endif #endif
/* issue cmd to drive */ /* issue cmd to drive */
hwif->OUTB(command, IDE_COMMAND_REG); 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 */) 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 */) ...@@ -269,7 +269,7 @@ static int trm290_ide_dma_read (ide_drive_t *drive /*, struct request *rq */)
#endif #endif
/* issue cmd to drive */ /* issue cmd to drive */
hwif->OUTB(command, IDE_COMMAND_REG); 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) static int trm290_ide_dma_begin (ide_drive_t *drive)
......
...@@ -1988,12 +1988,6 @@ pmac_ide_dma_write (ide_drive_t *drive) ...@@ -1988,12 +1988,6 @@ pmac_ide_dma_write (ide_drive_t *drive)
return pmac_ide_dma_begin(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 * Kick the DMA controller into life after the DMA command has been issued
* to the drive. * to the drive.
...@@ -2165,7 +2159,6 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) ...@@ -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_check = &pmac_ide_dma_check;
hwif->ide_dma_read = &pmac_ide_dma_read; hwif->ide_dma_read = &pmac_ide_dma_read;
hwif->ide_dma_write = &pmac_ide_dma_write; 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_begin = &pmac_ide_dma_begin;
hwif->ide_dma_end = &pmac_ide_dma_end; hwif->ide_dma_end = &pmac_ide_dma_end;
hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq; hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq;
......
...@@ -795,7 +795,6 @@ typedef struct ide_dma_ops_s { ...@@ -795,7 +795,6 @@ typedef struct ide_dma_ops_s {
int (*ide_dma_test_irq)(ide_drive_t *drive); int (*ide_dma_test_irq)(ide_drive_t *drive);
int (*ide_dma_host_on)(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_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_verbose)(ide_drive_t *drive);
int (*ide_dma_lostirq)(ide_drive_t *drive); int (*ide_dma_lostirq)(ide_drive_t *drive);
int (*ide_dma_timeout)(ide_drive_t *drive); int (*ide_dma_timeout)(ide_drive_t *drive);
...@@ -932,7 +931,6 @@ typedef struct hwif_s { ...@@ -932,7 +931,6 @@ typedef struct hwif_s {
int (*ide_dma_test_irq)(ide_drive_t *drive); int (*ide_dma_test_irq)(ide_drive_t *drive);
int (*ide_dma_host_on)(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_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_verbose)(ide_drive_t *drive);
int (*ide_dma_lostirq)(ide_drive_t *drive); int (*ide_dma_lostirq)(ide_drive_t *drive);
int (*ide_dma_timeout)(ide_drive_t *drive); int (*ide_dma_timeout)(ide_drive_t *drive);
...@@ -1618,7 +1616,6 @@ extern int __ide_dma_write(ide_drive_t *); ...@@ -1618,7 +1616,6 @@ extern int __ide_dma_write(ide_drive_t *);
extern int __ide_dma_begin(ide_drive_t *); extern int __ide_dma_begin(ide_drive_t *);
extern int __ide_dma_end(ide_drive_t *); extern int __ide_dma_end(ide_drive_t *);
extern int __ide_dma_test_irq(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_verbose(ide_drive_t *);
extern int __ide_dma_lostirq(ide_drive_t *); extern int __ide_dma_lostirq(ide_drive_t *);
extern int __ide_dma_timeout(ide_drive_t *); extern int __ide_dma_timeout(ide_drive_t *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment