]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/tx4939ide.c
Merge branch 'master' of git://git.infradead.org/users/dedekind/mtd-tests-2.6
[linux-2.6-omap-h63xx.git] / drivers / ide / tx4939ide.c
index 30d0d256230f226b9fe7e34a59a955360e9a06bf..4a8c5a21bd4c0cc3ab15c172e697193e1ad79a7f 100644 (file)
@@ -564,7 +564,7 @@ static void tx4939ide_input_data_swap(ide_drive_t *drive, struct request *rq,
 
        while (count--)
                *ptr++ = cpu_to_le16(__raw_readw((void __iomem *)port));
-       __ide_flush_dcache_range((unsigned long)buf, count * 2);
+       __ide_flush_dcache_range((unsigned long)buf, roundup(len, 2));
 }
 
 static void tx4939ide_output_data_swap(ide_drive_t *drive, struct request *rq,
@@ -578,7 +578,7 @@ static void tx4939ide_output_data_swap(ide_drive_t *drive, struct request *rq,
                __raw_writew(le16_to_cpu(*ptr), (void __iomem *)port);
                ptr++;
        }
-       __ide_flush_dcache_range((unsigned long)buf, count * 2);
+       __ide_flush_dcache_range((unsigned long)buf, roundup(len, 2));
 }
 
 static const struct ide_tp_ops tx4939ide_tp_ops = {
@@ -623,33 +623,34 @@ static const struct ide_tp_ops tx4939ide_tp_ops = {
 #endif /* __LITTLE_ENDIAN */
 
 static const struct ide_port_ops tx4939ide_port_ops = {
-       .set_pio_mode = tx4939ide_set_pio_mode,
-       .set_dma_mode = tx4939ide_set_dma_mode,
-       .clear_irq = tx4939ide_clear_irq,
-       .cable_detect = tx4939ide_cable_detect,
+       .set_pio_mode           = tx4939ide_set_pio_mode,
+       .set_dma_mode           = tx4939ide_set_dma_mode,
+       .clear_irq              = tx4939ide_clear_irq,
+       .cable_detect           = tx4939ide_cable_detect,
 };
 
 static const struct ide_dma_ops tx4939ide_dma_ops = {
-       .dma_host_set = tx4939ide_dma_host_set,
-       .dma_setup = tx4939ide_dma_setup,
-       .dma_exec_cmd = ide_dma_exec_cmd,
-       .dma_start = ide_dma_start,
-       .dma_end = tx4939ide_dma_end,
-       .dma_test_irq = tx4939ide_dma_test_irq,
-       .dma_lost_irq = ide_dma_lost_irq,
-       .dma_timeout = ide_dma_timeout,
+       .dma_host_set           = tx4939ide_dma_host_set,
+       .dma_setup              = tx4939ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
+       .dma_end                = tx4939ide_dma_end,
+       .dma_test_irq           = tx4939ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
 };
 
 static const struct ide_port_info tx4939ide_port_info __initdata = {
-       .init_hwif = tx4939ide_init_hwif,
-       .init_dma = tx4939ide_init_dma,
-       .port_ops = &tx4939ide_port_ops,
-       .dma_ops = &tx4939ide_dma_ops,
-       .tp_ops = &tx4939ide_tp_ops,
-       .host_flags = IDE_HFLAG_MMIO,
-       .pio_mask = ATA_PIO4,
-       .mwdma_mask = ATA_MWDMA2,
-       .udma_mask = ATA_UDMA5,
+       .init_hwif              = tx4939ide_init_hwif,
+       .init_dma               = tx4939ide_init_dma,
+       .port_ops               = &tx4939ide_port_ops,
+       .dma_ops                = &tx4939ide_dma_ops,
+       .tp_ops                 = &tx4939ide_tp_ops,
+       .host_flags             = IDE_HFLAG_MMIO,
+       .pio_mask               = ATA_PIO4,
+       .mwdma_mask             = ATA_MWDMA2,
+       .udma_mask              = ATA_UDMA5,
+       .chipset                = ide_generic,
 };
 
 static int __init tx4939ide_probe(struct platform_device *pdev)