dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dmaengine: fsl-edma: implement .device_synchronize callback
@ 2019-07-31 17:36 Andrey Smirnov
  2019-08-08 13:32 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2019-07-31 17:36 UTC (permalink / raw)
  To: dmaengine
  Cc: Andrey Smirnov, Stefan Agner, Chris Healy, Vinod Koul, linux-imx,
	linux-kernel

Implement .device_synchronize callback in order to be able to use
dmaengine_terminate_sync() and other primitives relying on said
callback.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: linux-imx@nxp.com
Cc: dmaengine@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/dma/fsl-edma.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c
index fcbad6ae954a..191fa71f67a3 100644
--- a/drivers/dma/fsl-edma.c
+++ b/drivers/dma/fsl-edma.c
@@ -20,6 +20,13 @@
 
 #include "fsl-edma-common.h"
 
+static void fsl_edma_synchronize(struct dma_chan *chan)
+{
+	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
+
+	vchan_synchronize(&fsl_chan->vchan);
+}
+
 static irqreturn_t fsl_edma_tx_handler(int irq, void *dev_id)
 {
 	struct fsl_edma_engine *fsl_edma = dev_id;
@@ -302,6 +309,7 @@ static int fsl_edma_probe(struct platform_device *pdev)
 	fsl_edma->dma_dev.device_pause = fsl_edma_pause;
 	fsl_edma->dma_dev.device_resume = fsl_edma_resume;
 	fsl_edma->dma_dev.device_terminate_all = fsl_edma_terminate_all;
+	fsl_edma->dma_dev.device_synchronize = fsl_edma_synchronize;
 	fsl_edma->dma_dev.device_issue_pending = fsl_edma_issue_pending;
 
 	fsl_edma->dma_dev.src_addr_widths = FSL_EDMA_BUSWIDTHS;
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: fsl-edma: implement .device_synchronize callback
  2019-07-31 17:36 [PATCH] dmaengine: fsl-edma: implement .device_synchronize callback Andrey Smirnov
@ 2019-08-08 13:32 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2019-08-08 13:32 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: dmaengine, Stefan Agner, Chris Healy, linux-imx, linux-kernel

On 31-07-19, 10:36, Andrey Smirnov wrote:
> Implement .device_synchronize callback in order to be able to use
> dmaengine_terminate_sync() and other primitives relying on said
> callback.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 17:36 [PATCH] dmaengine: fsl-edma: implement .device_synchronize callback Andrey Smirnov
2019-08-08 13:32 ` Vinod Koul

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org dmaengine@archiver.kernel.org
	public-inbox-index dmaengine


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/ public-inbox