aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/txx9
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2010-03-26 19:44:01 -0400
committerDan Williams <dan.j.williams@intel.com>2010-03-26 19:44:01 -0400
commitc3635c78e500a52c9fcd55de381a72928d9e054d (patch)
tree87403f402227cd8b5572550e70facf81c9eaa0d9 /sound/soc/txx9
parent0f65169b1bf44220308e1ce1f6666ad03ddc27af (diff)
DMAENGINE: generic slave control v2
Convert the device_terminate_all() operation on the DMA engine to a generic device_control() operation which can now optionally support also pausing and resuming DMA on a certain channel. Implemented for the COH 901 318 DMAC as an example. [dan.j.williams@intel.com: update for timberdale] Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Li Yang <leoli@freescale.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Magnus Damm <damm@opensource.se> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Joe Perches <joe@perches.com> Cc: Roland Dreier <rdreier@cisco.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'sound/soc/txx9')
-rw-r--r--sound/soc/txx9/txx9aclc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c
index efed64b8b026..b35d00706c0e 100644
--- a/sound/soc/txx9/txx9aclc.c
+++ b/sound/soc/txx9/txx9aclc.c
@@ -159,7 +159,7 @@ static void txx9aclc_dma_tasklet(unsigned long data)
159 void __iomem *base = drvdata->base; 159 void __iomem *base = drvdata->base;
160 160
161 spin_unlock_irqrestore(&dmadata->dma_lock, flags); 161 spin_unlock_irqrestore(&dmadata->dma_lock, flags);
162 chan->device->device_terminate_all(chan); 162 chan->device->device_control(chan, DMA_TERMINATE_ALL);
163 /* first time */ 163 /* first time */
164 for (i = 0; i < NR_DMA_CHAIN; i++) { 164 for (i = 0; i < NR_DMA_CHAIN; i++) {
165 desc = txx9aclc_dma_submit(dmadata, 165 desc = txx9aclc_dma_submit(dmadata,
@@ -267,7 +267,7 @@ static int txx9aclc_pcm_close(struct snd_pcm_substream *substream)
267 struct dma_chan *chan = dmadata->dma_chan; 267 struct dma_chan *chan = dmadata->dma_chan;
268 268
269 dmadata->frag_count = -1; 269 dmadata->frag_count = -1;
270 chan->device->device_terminate_all(chan); 270 chan->device->device_control(chan, DMA_TERMINATE_ALL);
271 return 0; 271 return 0;
272} 272}
273 273
@@ -396,7 +396,7 @@ static int txx9aclc_pcm_remove(struct platform_device *pdev)
396 struct dma_chan *chan = dmadata->dma_chan; 396 struct dma_chan *chan = dmadata->dma_chan;
397 if (chan) { 397 if (chan) {
398 dmadata->frag_count = -1; 398 dmadata->frag_count = -1;
399 chan->device->device_terminate_all(chan); 399 chan->device->device_control(chan, DMA_TERMINATE_ALL);
400 dma_release_channel(chan); 400 dma_release_channel(chan);
401 } 401 }
402 dev->dmadata[i].dma_chan = NULL; 402 dev->dmadata[i].dma_chan = NULL;