aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/arm/icside.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index d7f4c533c45c..9118587a0db8 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -384,7 +384,7 @@ static void icside_dma_lost_irq(ide_drive_t *drive)
384 printk(KERN_ERR "%s: IRQ lost\n", drive->name); 384 printk(KERN_ERR "%s: IRQ lost\n", drive->name);
385} 385}
386 386
387static void icside_dma_init(ide_hwif_t *hwif) 387static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d)
388{ 388{
389 hwif->dmatable_cpu = NULL; 389 hwif->dmatable_cpu = NULL;
390 hwif->dmatable_dma = 0; 390 hwif->dmatable_dma = 0;
@@ -397,11 +397,16 @@ static void icside_dma_init(ide_hwif_t *hwif)
397 hwif->ide_dma_test_irq = icside_dma_test_irq; 397 hwif->ide_dma_test_irq = icside_dma_test_irq;
398 hwif->dma_timeout = icside_dma_timeout; 398 hwif->dma_timeout = icside_dma_timeout;
399 hwif->dma_lost_irq = icside_dma_lost_irq; 399 hwif->dma_lost_irq = icside_dma_lost_irq;
400
401 return 0;
400} 402}
401#else
402#define icside_dma_init(hwif) (0)
403#endif 403#endif
404 404
405static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d)
406{
407 return -EOPNOTSUPP;
408}
409
405static ide_hwif_t * 410static ide_hwif_t *
406icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *ec) 411icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *ec)
407{ 412{
@@ -468,9 +473,9 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
468} 473}
469 474
470static const struct ide_port_info icside_v6_port_info __initdata = { 475static const struct ide_port_info icside_v6_port_info __initdata = {
476 .init_dma = icside_dma_off_init,
471 .port_ops = &icside_v6_no_dma_port_ops, 477 .port_ops = &icside_v6_no_dma_port_ops,
472 .host_flags = IDE_HFLAG_SERIALIZE | 478 .host_flags = IDE_HFLAG_SERIALIZE |
473 IDE_HFLAG_NO_DMA | /* no SFF-style DMA */
474 IDE_HFLAG_NO_AUTOTUNE, 479 IDE_HFLAG_NO_AUTOTUNE,
475 .mwdma_mask = ATA_MWDMA2, 480 .mwdma_mask = ATA_MWDMA2,
476 .swdma_mask = ATA_SWDMA2, 481 .swdma_mask = ATA_SWDMA2,
@@ -543,11 +548,9 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
543 mate->select_data = sel | 1; 548 mate->select_data = sel | 1;
544 549
545 if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) { 550 if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) {
546 icside_dma_init(hwif); 551 d.init_dma = icside_dma_init;
547 icside_dma_init(mate);
548 d.port_ops = &icside_v6_dma_port_ops; 552 d.port_ops = &icside_v6_dma_port_ops;
549 } else 553 }
550 d.mwdma_mask = d.swdma_mask = 0;
551 554
552 idx[0] = hwif->index; 555 idx[0] = hwif->index;
553 idx[1] = mate->index; 556 idx[1] = mate->index;