diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 18:34:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 18:34:57 -0400 |
commit | ef08e78268423fc4d7fbc3e54bd9a67fc8da7cc5 (patch) | |
tree | d0561d3ef89c9cd277a38168e33850666cbd33c4 /sound | |
parent | 71db34fc4330f7c784397acb9f1e6ee7f7b32eb2 (diff) | |
parent | 5b2e02e401deb44e7f5befe19404d8b2688efea4 (diff) |
Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine update from Vinod Koul:
"This includes the cookie cleanup by Russell, the addition of context
parameter for dmaengine APIs, more arm dmaengine driver cleanup by
moving code to dmaengine, this time for imx by Javier and pl330 by
Boojin along with the usual driver fixes."
Fix up some fairly trivial conflicts with various other cleanups.
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits)
dmaengine: imx: fix the build failure on x86_64
dmaengine: i.MX: Fix merge of cookie branch.
dmaengine: i.MX: Add support for interleaved transfers.
dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'.
dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
dmaengine: imx-dma: remove internal structure.
dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure.
dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
dmaengine: imx-dma: remove sg member from internal structure.
dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function.
dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function.
dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function.
dmaengine: imx-dma: remove dma_mode member of internal structure.
dmaengine: imx-dma: remove data member from internal structure.
dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c
dmaengine: at_hdmac: add slave config operation
dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
dmaengine/dma_slave: introduce inline wrappers
dma: imx-sdma: Treat firmware messages as warnings instead of erros
...
Diffstat (limited to 'sound')
-rw-r--r-- | sound/atmel/abdac.c | 18 | ||||
-rw-r--r-- | sound/atmel/ac97c.c | 41 | ||||
-rw-r--r-- | sound/soc/imx/imx-pcm-dma-mx2.c | 3 | ||||
-rw-r--r-- | sound/soc/sh/siu_pcm.c | 4 | ||||
-rw-r--r-- | sound/soc/txx9/txx9aclc.c | 2 |
5 files changed, 53 insertions, 15 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"); |
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 61dade698358..115313ef54d6 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/types.h> | ||
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | 25 | ||
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
@@ -1014,16 +1015,28 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev) | |||
1014 | 1015 | ||
1015 | if (cpu_is_at32ap7000()) { | 1016 | if (cpu_is_at32ap7000()) { |
1016 | if (pdata->rx_dws.dma_dev) { | 1017 | if (pdata->rx_dws.dma_dev) { |
1017 | struct dw_dma_slave *dws = &pdata->rx_dws; | ||
1018 | dma_cap_mask_t mask; | 1018 | dma_cap_mask_t mask; |
1019 | 1019 | ||
1020 | dws->rx_reg = regs->start + AC97C_CARHR + 2; | ||
1021 | |||
1022 | dma_cap_zero(mask); | 1020 | dma_cap_zero(mask); |
1023 | dma_cap_set(DMA_SLAVE, mask); | 1021 | dma_cap_set(DMA_SLAVE, mask); |
1024 | 1022 | ||
1025 | chip->dma.rx_chan = dma_request_channel(mask, filter, | 1023 | chip->dma.rx_chan = dma_request_channel(mask, filter, |
1026 | dws); | 1024 | &pdata->rx_dws); |
1025 | if (chip->dma.rx_chan) { | ||
1026 | struct dma_slave_config dma_conf = { | ||
1027 | .src_addr = regs->start + AC97C_CARHR + | ||
1028 | 2, | ||
1029 | .src_addr_width = | ||
1030 | DMA_SLAVE_BUSWIDTH_2_BYTES, | ||
1031 | .src_maxburst = 1, | ||
1032 | .dst_maxburst = 1, | ||
1033 | .direction = DMA_DEV_TO_MEM, | ||
1034 | .device_fc = false, | ||
1035 | }; | ||
1036 | |||
1037 | dmaengine_slave_config(chip->dma.rx_chan, | ||
1038 | &dma_conf); | ||
1039 | } | ||
1027 | 1040 | ||
1028 | dev_info(&chip->pdev->dev, "using %s for DMA RX\n", | 1041 | dev_info(&chip->pdev->dev, "using %s for DMA RX\n", |
1029 | dev_name(&chip->dma.rx_chan->dev->device)); | 1042 | dev_name(&chip->dma.rx_chan->dev->device)); |
@@ -1031,16 +1044,28 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev) | |||
1031 | } | 1044 | } |
1032 | 1045 | ||
1033 | if (pdata->tx_dws.dma_dev) { | 1046 | if (pdata->tx_dws.dma_dev) { |
1034 | struct dw_dma_slave *dws = &pdata->tx_dws; | ||
1035 | dma_cap_mask_t mask; | 1047 | dma_cap_mask_t mask; |
1036 | 1048 | ||
1037 | dws->tx_reg = regs->start + AC97C_CATHR + 2; | ||
1038 | |||
1039 | dma_cap_zero(mask); | 1049 | dma_cap_zero(mask); |
1040 | dma_cap_set(DMA_SLAVE, mask); | 1050 | dma_cap_set(DMA_SLAVE, mask); |
1041 | 1051 | ||
1042 | chip->dma.tx_chan = dma_request_channel(mask, filter, | 1052 | chip->dma.tx_chan = dma_request_channel(mask, filter, |
1043 | dws); | 1053 | &pdata->tx_dws); |
1054 | if (chip->dma.tx_chan) { | ||
1055 | struct dma_slave_config dma_conf = { | ||
1056 | .dst_addr = regs->start + AC97C_CATHR + | ||
1057 | 2, | ||
1058 | .dst_addr_width = | ||
1059 | DMA_SLAVE_BUSWIDTH_2_BYTES, | ||
1060 | .src_maxburst = 1, | ||
1061 | .dst_maxburst = 1, | ||
1062 | .direction = DMA_MEM_TO_DEV, | ||
1063 | .device_fc = false, | ||
1064 | }; | ||
1065 | |||
1066 | dmaengine_slave_config(chip->dma.tx_chan, | ||
1067 | &dma_conf); | ||
1068 | } | ||
1044 | 1069 | ||
1045 | dev_info(&chip->pdev->dev, "using %s for DMA TX\n", | 1070 | dev_info(&chip->pdev->dev, "using %s for DMA TX\n", |
1046 | dev_name(&chip->dma.tx_chan->dev->device)); | 1071 | dev_name(&chip->dma.tx_chan->dev->device)); |
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index e43c8fa2788b..6b818de2fc03 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/dmaengine.h> | 23 | #include <linux/dmaengine.h> |
24 | #include <linux/types.h> | ||
24 | 25 | ||
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include <sound/initval.h> | 27 | #include <sound/initval.h> |
@@ -58,6 +59,8 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
58 | if (ret) | 59 | if (ret) |
59 | return ret; | 60 | return ret; |
60 | 61 | ||
62 | slave_config.device_fc = false; | ||
63 | |||
61 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 64 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
62 | slave_config.dst_addr = dma_params->dma_addr; | 65 | slave_config.dst_addr = dma_params->dma_addr; |
63 | slave_config.dst_maxburst = dma_params->burstsize; | 66 | slave_config.dst_maxburst = dma_params->burstsize; |
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index 0193e595d415..5cfcc655e95f 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c | |||
@@ -130,7 +130,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info, | |||
130 | sg_dma_len(&sg) = size; | 130 | sg_dma_len(&sg) = size; |
131 | sg_dma_address(&sg) = buff; | 131 | sg_dma_address(&sg) = buff; |
132 | 132 | ||
133 | desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, | 133 | desc = dmaengine_prep_slave_sg(siu_stream->chan, |
134 | &sg, 1, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 134 | &sg, 1, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
135 | if (!desc) { | 135 | if (!desc) { |
136 | dev_err(dev, "Failed to allocate a dma descriptor\n"); | 136 | dev_err(dev, "Failed to allocate a dma descriptor\n"); |
@@ -180,7 +180,7 @@ static int siu_pcm_rd_set(struct siu_port *port_info, | |||
180 | sg_dma_len(&sg) = size; | 180 | sg_dma_len(&sg) = size; |
181 | sg_dma_address(&sg) = buff; | 181 | sg_dma_address(&sg) = buff; |
182 | 182 | ||
183 | desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan, | 183 | desc = dmaengine_prep_slave_sg(siu_stream->chan, |
184 | &sg, 1, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 184 | &sg, 1, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
185 | if (!desc) { | 185 | if (!desc) { |
186 | dev_err(dev, "Failed to allocate dma descriptor\n"); | 186 | dev_err(dev, "Failed to allocate dma descriptor\n"); |
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c index 21554611557c..b609d2c64c55 100644 --- a/sound/soc/txx9/txx9aclc.c +++ b/sound/soc/txx9/txx9aclc.c | |||
@@ -132,7 +132,7 @@ txx9aclc_dma_submit(struct txx9aclc_dmadata *dmadata, dma_addr_t buf_dma_addr) | |||
132 | sg_set_page(&sg, pfn_to_page(PFN_DOWN(buf_dma_addr)), | 132 | sg_set_page(&sg, pfn_to_page(PFN_DOWN(buf_dma_addr)), |
133 | dmadata->frag_bytes, buf_dma_addr & (PAGE_SIZE - 1)); | 133 | dmadata->frag_bytes, buf_dma_addr & (PAGE_SIZE - 1)); |
134 | sg_dma_address(&sg) = buf_dma_addr; | 134 | sg_dma_address(&sg) = buf_dma_addr; |
135 | desc = chan->device->device_prep_slave_sg(chan, &sg, 1, | 135 | desc = dmaengine_prep_slave_sg(chan, &sg, 1, |
136 | dmadata->substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? | 136 | dmadata->substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? |
137 | DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, | 137 | DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, |
138 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 138 | DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |