diff options
Diffstat (limited to 'sound/atmel/abdac.c')
-rw-r--r-- | sound/atmel/abdac.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index 4fa1dbd8ee83..f7c2bb08055d 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/types.h> | ||
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | 21 | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
@@ -467,15 +468,24 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev) | |||
467 | snd_card_set_dev(card, &pdev->dev); | 468 | snd_card_set_dev(card, &pdev->dev); |
468 | 469 | ||
469 | if (pdata->dws.dma_dev) { | 470 | if (pdata->dws.dma_dev) { |
470 | struct dw_dma_slave *dws = &pdata->dws; | ||
471 | dma_cap_mask_t mask; | 471 | dma_cap_mask_t mask; |
472 | 472 | ||
473 | dws->tx_reg = regs->start + DAC_DATA; | ||
474 | |||
475 | dma_cap_zero(mask); | 473 | dma_cap_zero(mask); |
476 | dma_cap_set(DMA_SLAVE, mask); | 474 | dma_cap_set(DMA_SLAVE, mask); |
477 | 475 | ||
478 | dac->dma.chan = dma_request_channel(mask, filter, dws); | 476 | dac->dma.chan = dma_request_channel(mask, filter, &pdata->dws); |
477 | if (dac->dma.chan) { | ||
478 | struct dma_slave_config dma_conf = { | ||
479 | .dst_addr = regs->start + DAC_DATA, | ||
480 | .dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, | ||
481 | .src_maxburst = 1, | ||
482 | .dst_maxburst = 1, | ||
483 | .direction = DMA_MEM_TO_DEV, | ||
484 | .device_fc = false, | ||
485 | }; | ||
486 | |||
487 | dmaengine_slave_config(dac->dma.chan, &dma_conf); | ||
488 | } | ||
479 | } | 489 | } |
480 | if (!pdata->dws.dma_dev || !dac->dma.chan) { | 490 | if (!pdata->dws.dma_dev || !dac->dma.chan) { |
481 | dev_dbg(&pdev->dev, "DMA not available\n"); | 491 | dev_dbg(&pdev->dev, "DMA not available\n"); |