diff options
Diffstat (limited to 'drivers/ide/ppc')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index ac36c6c4013f..0ee16acfdf29 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -930,9 +930,14 @@ static const struct ide_port_ops pmac_ide_port_ops = { | |||
930 | .selectproc = pmac_ide_selectproc, | 930 | .selectproc = pmac_ide_selectproc, |
931 | }; | 931 | }; |
932 | 932 | ||
933 | static struct ide_dma_ops pmac_dma_ops; | ||
934 | |||
933 | static const struct ide_port_info pmac_port_info = { | 935 | static const struct ide_port_info pmac_port_info = { |
934 | .init_dma = pmac_ide_init_dma, | 936 | .init_dma = pmac_ide_init_dma, |
935 | .chipset = ide_pmac, | 937 | .chipset = ide_pmac, |
938 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
939 | .dma_ops = &pmac_dma_ops, | ||
940 | #endif | ||
936 | .port_ops = &pmac_ide_port_ops, | 941 | .port_ops = &pmac_ide_port_ops, |
937 | .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | | 942 | .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | |
938 | IDE_HFLAG_POST_SET_MODE | | 943 | IDE_HFLAG_POST_SET_MODE | |
@@ -1670,6 +1675,17 @@ pmac_ide_dma_lost_irq (ide_drive_t *drive) | |||
1670 | printk(KERN_ERR "ide-pmac lost interrupt, dma status: %lx\n", status); | 1675 | printk(KERN_ERR "ide-pmac lost interrupt, dma status: %lx\n", status); |
1671 | } | 1676 | } |
1672 | 1677 | ||
1678 | static struct ide_dma_ops pmac_dma_ops = { | ||
1679 | .dma_host_set = pmac_ide_dma_host_set, | ||
1680 | .dma_setup = pmac_ide_dma_setup, | ||
1681 | .dma_exec_cmd = pmac_ide_dma_exec_cmd, | ||
1682 | .dma_start = pmac_ide_dma_start, | ||
1683 | .dma_end = pmac_ide_dma_end, | ||
1684 | .dma_test_irq = pmac_ide_dma_test_irq, | ||
1685 | .dma_timeout = ide_dma_timeout, | ||
1686 | .dma_lost_irq = pmac_ide_dma_lost_irq, | ||
1687 | }; | ||
1688 | |||
1673 | /* | 1689 | /* |
1674 | * Allocate the data structures needed for using DMA with an interface | 1690 | * Allocate the data structures needed for using DMA with an interface |
1675 | * and fill the proper list of functions pointers | 1691 | * and fill the proper list of functions pointers |
@@ -1702,15 +1718,6 @@ static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, | |||
1702 | 1718 | ||
1703 | hwif->sg_max_nents = MAX_DCMDS; | 1719 | hwif->sg_max_nents = MAX_DCMDS; |
1704 | 1720 | ||
1705 | hwif->dma_host_set = &pmac_ide_dma_host_set; | ||
1706 | hwif->dma_setup = &pmac_ide_dma_setup; | ||
1707 | hwif->dma_exec_cmd = &pmac_ide_dma_exec_cmd; | ||
1708 | hwif->dma_start = &pmac_ide_dma_start; | ||
1709 | hwif->ide_dma_end = &pmac_ide_dma_end; | ||
1710 | hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq; | ||
1711 | hwif->dma_timeout = &ide_dma_timeout; | ||
1712 | hwif->dma_lost_irq = &pmac_ide_dma_lost_irq; | ||
1713 | |||
1714 | return 0; | 1721 | return 0; |
1715 | } | 1722 | } |
1716 | #else | 1723 | #else |