diff options
Diffstat (limited to 'drivers/ide/mips')
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 54323ab64def..579caa3b06f4 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -366,21 +366,31 @@ static void auide_init_dbdma_dev(dbdev_tab_t *dev, u32 dev_id, u32 tsize, u32 de | |||
366 | dev->dev_devwidth = devwidth; | 366 | dev->dev_devwidth = devwidth; |
367 | dev->dev_flags = flags; | 367 | dev->dev_flags = flags; |
368 | } | 368 | } |
369 | |||
370 | #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA) | ||
371 | 369 | ||
370 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | ||
372 | static void auide_dma_timeout(ide_drive_t *drive) | 371 | static void auide_dma_timeout(ide_drive_t *drive) |
373 | { | 372 | { |
374 | ide_hwif_t *hwif = HWIF(drive); | 373 | ide_hwif_t *hwif = HWIF(drive); |
375 | 374 | ||
376 | printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name); | 375 | printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name); |
377 | 376 | ||
378 | if (hwif->ide_dma_test_irq(drive)) | 377 | if (auide_dma_test_irq(drive)) |
379 | return; | 378 | return; |
380 | 379 | ||
381 | hwif->ide_dma_end(drive); | 380 | auide_dma_end(drive); |
382 | } | 381 | } |
383 | 382 | ||
383 | static struct ide_dma_ops au1xxx_dma_ops = { | ||
384 | .dma_host_set = auide_dma_host_set, | ||
385 | .dma_setup = auide_dma_setup, | ||
386 | .dma_exec_cmd = auide_dma_exec_cmd, | ||
387 | .dma_start = auide_dma_start, | ||
388 | .dma_end = auide_dma_end, | ||
389 | .dma_test_irq = auide_dma_test_irq, | ||
390 | .dma_lost_irq = auide_dma_lost_irq, | ||
391 | .dma_timeout = auide_dma_timeout, | ||
392 | }; | ||
393 | |||
384 | static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) | 394 | static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) |
385 | { | 395 | { |
386 | _auide_hwif *auide = (_auide_hwif *)hwif->hwif_data; | 396 | _auide_hwif *auide = (_auide_hwif *)hwif->hwif_data; |
@@ -511,6 +521,9 @@ static const struct ide_port_ops au1xxx_port_ops = { | |||
511 | static const struct ide_port_info au1xxx_port_info = { | 521 | static const struct ide_port_info au1xxx_port_info = { |
512 | .init_dma = auide_ddma_init, | 522 | .init_dma = auide_ddma_init, |
513 | .port_ops = &au1xxx_port_ops, | 523 | .port_ops = &au1xxx_port_ops, |
524 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | ||
525 | .dma_ops = &au1xxx_dma_ops, | ||
526 | #endif | ||
514 | .host_flags = IDE_HFLAG_POST_SET_MODE | | 527 | .host_flags = IDE_HFLAG_POST_SET_MODE | |
515 | IDE_HFLAG_NO_IO_32BIT | | 528 | IDE_HFLAG_NO_IO_32BIT | |
516 | IDE_HFLAG_UNMASK_IRQS, | 529 | IDE_HFLAG_UNMASK_IRQS, |
@@ -589,16 +602,6 @@ static int au_ide_probe(struct device *dev) | |||
589 | hwif->INSW = auide_insw; | 602 | hwif->INSW = auide_insw; |
590 | hwif->OUTSW = auide_outsw; | 603 | hwif->OUTSW = auide_outsw; |
591 | #endif | 604 | #endif |
592 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | ||
593 | hwif->dma_timeout = &auide_dma_timeout; | ||
594 | hwif->dma_host_set = &auide_dma_host_set; | ||
595 | hwif->dma_exec_cmd = &auide_dma_exec_cmd; | ||
596 | hwif->dma_start = &auide_dma_start; | ||
597 | hwif->ide_dma_end = &auide_dma_end; | ||
598 | hwif->dma_setup = &auide_dma_setup; | ||
599 | hwif->ide_dma_test_irq = &auide_dma_test_irq; | ||
600 | hwif->dma_lost_irq = &auide_dma_lost_irq; | ||
601 | #endif | ||
602 | hwif->select_data = 0; /* no chipset-specific code */ | 605 | hwif->select_data = 0; /* no chipset-specific code */ |
603 | hwif->config_data = 0; /* no chipset-specific code */ | 606 | hwif->config_data = 0; /* no chipset-specific code */ |
604 | 607 | ||