aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/at_hdmac.c3
-rw-r--r--drivers/dma/coh901318.c5
-rw-r--r--drivers/dma/dw_dmac.c3
-rw-r--r--drivers/dma/fsldma.c2
-rw-r--r--drivers/dma/ipu/ipu_idmac.c12
-rw-r--r--drivers/dma/shdma.c3
-rw-r--r--drivers/dma/ste_dma40.c3
-rw-r--r--drivers/dma/timb_dma.c3
-rw-r--r--drivers/dma/txx9dmac.c3
-rw-r--r--drivers/mmc/host/atmel-mci.c2
-rw-r--r--drivers/serial/sh-sci.c2
-rw-r--r--drivers/video/mx3fb.c2
-rw-r--r--include/linux/dmaengine.h3
-rw-r--r--sound/soc/txx9/txx9aclc.c7
14 files changed, 32 insertions, 21 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 93ed99c84cf1..ee805a43f879 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -759,7 +759,8 @@ err_desc_get:
759 return NULL; 759 return NULL;
760} 760}
761 761
762static int atc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 762static int atc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
763 unsigned long arg)
763{ 764{
764 struct at_dma_chan *atchan = to_at_dma_chan(chan); 765 struct at_dma_chan *atchan = to_at_dma_chan(chan);
765 struct at_dma *atdma = to_at_dma(chan->device); 766 struct at_dma *atdma = to_at_dma(chan->device);
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c
index 4233440741a2..a724e6be1b4d 100644
--- a/drivers/dma/coh901318.c
+++ b/drivers/dma/coh901318.c
@@ -942,7 +942,7 @@ coh901318_free_chan_resources(struct dma_chan *chan)
942 942
943 spin_unlock_irqrestore(&cohc->lock, flags); 943 spin_unlock_irqrestore(&cohc->lock, flags);
944 944
945 chan->device->device_control(chan, DMA_TERMINATE_ALL); 945 chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
946} 946}
947 947
948 948
@@ -1176,7 +1176,8 @@ coh901318_issue_pending(struct dma_chan *chan)
1176} 1176}
1177 1177
1178static int 1178static int
1179coh901318_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 1179coh901318_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
1180 unsigned long arg)
1180{ 1181{
1181 unsigned long flags; 1182 unsigned long flags;
1182 struct coh901318_chan *cohc = to_coh901318_chan(chan); 1183 struct coh901318_chan *cohc = to_coh901318_chan(chan);
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 18fb5b41cedf..a3991ab0d67e 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -781,7 +781,8 @@ err_desc_get:
781 return NULL; 781 return NULL;
782} 782}
783 783
784static int dwc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 784static int dwc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
785 unsigned long arg)
785{ 786{
786 struct dw_dma_chan *dwc = to_dw_dma_chan(chan); 787 struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
787 struct dw_dma *dw = to_dw_dma(chan->device); 788 struct dw_dma *dw = to_dw_dma(chan->device);
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index cb1924f46c9e..005329d496bd 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -775,7 +775,7 @@ fail:
775} 775}
776 776
777static int fsl_dma_device_control(struct dma_chan *dchan, 777static int fsl_dma_device_control(struct dma_chan *dchan,
778 enum dma_ctrl_cmd cmd) 778 enum dma_ctrl_cmd cmd, unsigned long arg)
779{ 779{
780 struct fsldma_chan *chan; 780 struct fsldma_chan *chan;
781 unsigned long flags; 781 unsigned long flags;
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
index 246a6143e4a7..cb26ee9773d6 100644
--- a/drivers/dma/ipu/ipu_idmac.c
+++ b/drivers/dma/ipu/ipu_idmac.c
@@ -1472,7 +1472,8 @@ static void idmac_issue_pending(struct dma_chan *chan)
1472 */ 1472 */
1473} 1473}
1474 1474
1475static int __idmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 1475static int __idmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
1476 unsigned long arg)
1476{ 1477{
1477 struct idmac_channel *ichan = to_idmac_chan(chan); 1478 struct idmac_channel *ichan = to_idmac_chan(chan);
1478 struct idmac *idmac = to_idmac(chan->device); 1479 struct idmac *idmac = to_idmac(chan->device);
@@ -1513,14 +1514,15 @@ static int __idmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd)
1513 return 0; 1514 return 0;
1514} 1515}
1515 1516
1516static int idmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 1517static int idmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
1518 unsigned long arg)
1517{ 1519{
1518 struct idmac_channel *ichan = to_idmac_chan(chan); 1520 struct idmac_channel *ichan = to_idmac_chan(chan);
1519 int ret; 1521 int ret;
1520 1522
1521 mutex_lock(&ichan->chan_mutex); 1523 mutex_lock(&ichan->chan_mutex);
1522 1524
1523 ret = __idmac_control(chan, cmd); 1525 ret = __idmac_control(chan, cmd, arg);
1524 1526
1525 mutex_unlock(&ichan->chan_mutex); 1527 mutex_unlock(&ichan->chan_mutex);
1526 1528
@@ -1616,7 +1618,7 @@ static void idmac_free_chan_resources(struct dma_chan *chan)
1616 1618
1617 mutex_lock(&ichan->chan_mutex); 1619 mutex_lock(&ichan->chan_mutex);
1618 1620
1619 __idmac_control(chan, DMA_TERMINATE_ALL); 1621 __idmac_control(chan, DMA_TERMINATE_ALL, 0);
1620 1622
1621 if (ichan->status > IPU_CHANNEL_FREE) { 1623 if (ichan->status > IPU_CHANNEL_FREE) {
1622#ifdef DEBUG 1624#ifdef DEBUG
@@ -1709,7 +1711,7 @@ static void __exit ipu_idmac_exit(struct ipu *ipu)
1709 for (i = 0; i < IPU_CHANNELS_NUM; i++) { 1711 for (i = 0; i < IPU_CHANNELS_NUM; i++) {
1710 struct idmac_channel *ichan = ipu->channel + i; 1712 struct idmac_channel *ichan = ipu->channel + i;
1711 1713
1712 idmac_control(&ichan->dma_chan, DMA_TERMINATE_ALL); 1714 idmac_control(&ichan->dma_chan, DMA_TERMINATE_ALL, 0);
1713 idmac_prep_slave_sg(&ichan->dma_chan, NULL, 0, DMA_NONE, 0); 1715 idmac_prep_slave_sg(&ichan->dma_chan, NULL, 0, DMA_NONE, 0);
1714 } 1716 }
1715 1717
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 98f82cdb404c..e9de1d35c20d 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -580,7 +580,8 @@ static struct dma_async_tx_descriptor *sh_dmae_prep_slave_sg(
580 direction, flags); 580 direction, flags);
581} 581}
582 582
583static int sh_dmae_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 583static int sh_dmae_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
584 unsigned long arg)
584{ 585{
585 struct sh_dmae_chan *sh_chan = to_sh_chan(chan); 586 struct sh_dmae_chan *sh_chan = to_sh_chan(chan);
586 587
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 81fec95312b6..c426829f6ab8 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2065,7 +2065,8 @@ static void d40_issue_pending(struct dma_chan *chan)
2065 spin_unlock_irqrestore(&d40c->lock, flags); 2065 spin_unlock_irqrestore(&d40c->lock, flags);
2066} 2066}
2067 2067
2068static int d40_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 2068static int d40_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
2069 unsigned long arg)
2069{ 2070{
2070 unsigned long flags; 2071 unsigned long flags;
2071 struct d40_chan *d40c = container_of(chan, struct d40_chan, chan); 2072 struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 44b346d8d319..0172fa3c7a2b 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -611,7 +611,8 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
611 return &td_desc->txd; 611 return &td_desc->txd;
612} 612}
613 613
614static int td_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 614static int td_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
615 unsigned long arg)
615{ 616{
616 struct timb_dma_chan *td_chan = 617 struct timb_dma_chan *td_chan =
617 container_of(chan, struct timb_dma_chan, chan); 618 container_of(chan, struct timb_dma_chan, chan);
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c
index e523737639aa..d02edb05910e 100644
--- a/drivers/dma/txx9dmac.c
+++ b/drivers/dma/txx9dmac.c
@@ -938,7 +938,8 @@ txx9dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
938 return &first->txd; 938 return &first->txd;
939} 939}
940 940
941static int txx9dmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) 941static int txx9dmac_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
942 unsigned long arg)
942{ 943{
943 struct txx9dmac_chan *dc = to_txx9dmac_chan(chan); 944 struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
944 struct txx9dmac_desc *desc, *_desc; 945 struct txx9dmac_desc *desc, *_desc;
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index ae6d24ba4f08..fd2d24f81478 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -578,7 +578,7 @@ static void atmci_stop_dma(struct atmel_mci *host)
578 struct dma_chan *chan = host->data_chan; 578 struct dma_chan *chan = host->data_chan;
579 579
580 if (chan) { 580 if (chan) {
581 chan->device->device_control(chan, DMA_TERMINATE_ALL); 581 chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
582 atmci_dma_cleanup(host); 582 atmci_dma_cleanup(host);
583 } else { 583 } else {
584 /* Data transfer was stopped by the interrupt handler */ 584 /* Data transfer was stopped by the interrupt handler */
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 690988237971..882f3d5ed028 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1087,7 +1087,7 @@ static void work_fn_rx(struct work_struct *work)
1087 unsigned long flags; 1087 unsigned long flags;
1088 int count; 1088 int count;
1089 1089
1090 chan->device->device_control(chan, DMA_TERMINATE_ALL); 1090 chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
1091 dev_dbg(port->dev, "Read %u bytes with cookie %d\n", 1091 dev_dbg(port->dev, "Read %u bytes with cookie %d\n",
1092 sh_desc->partial, sh_desc->cookie); 1092 sh_desc->partial, sh_desc->cookie);
1093 1093
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 3aa50bc276eb..7cfc170bce19 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -388,7 +388,7 @@ static void sdc_disable_channel(struct mx3fb_info *mx3_fbi)
388 spin_unlock_irqrestore(&mx3fb->lock, flags); 388 spin_unlock_irqrestore(&mx3fb->lock, flags);
389 389
390 mx3_fbi->txd->chan->device->device_control(mx3_fbi->txd->chan, 390 mx3_fbi->txd->chan->device->device_control(mx3_fbi->txd->chan,
391 DMA_TERMINATE_ALL); 391 DMA_TERMINATE_ALL, 0);
392 mx3_fbi->txd = NULL; 392 mx3_fbi->txd = NULL;
393 mx3_fbi->cookie = -EINVAL; 393 mx3_fbi->cookie = -EINVAL;
394} 394}
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 50b7b3e0d572..17456571ff7a 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -347,7 +347,8 @@ struct dma_device {
347 struct dma_chan *chan, struct scatterlist *sgl, 347 struct dma_chan *chan, struct scatterlist *sgl,
348 unsigned int sg_len, enum dma_data_direction direction, 348 unsigned int sg_len, enum dma_data_direction direction,
349 unsigned long flags); 349 unsigned long flags);
350 int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd); 350 int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
351 unsigned long arg);
351 352
352 enum dma_status (*device_tx_status)(struct dma_chan *chan, 353 enum dma_status (*device_tx_status)(struct dma_chan *chan,
353 dma_cookie_t cookie, 354 dma_cookie_t cookie,
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c
index b35d00706c0e..9398f507f77f 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_control(chan, DMA_TERMINATE_ALL); 162 chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
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_control(chan, DMA_TERMINATE_ALL); 270 chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
271 return 0; 271 return 0;
272} 272}
273 273
@@ -396,7 +396,8 @@ 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_control(chan, DMA_TERMINATE_ALL); 399 chan->device->device_control(chan,
400 DMA_TERMINATE_ALL, 0);
400 dma_release_channel(chan); 401 dma_release_channel(chan);
401 } 402 }
402 dev->dmadata[i].dma_chan = NULL; 403 dev->dmadata[i].dma_chan = NULL;