dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sia Jee Heng <jee.heng.sia@intel.com>
To: <dmaengine@vger.kernel.org>
Cc: <vkoul@kernel.org>, <Eugeniy.Paltsev@synopsys.com>,
	<andriy.shevchenko@intel.com>, <jee.heng.sia@intel.com>
Subject: [PATCH 4/4] dmaengine: dw-axi-dmac: Add device_synchronize() callback
Date: Fri,  4 Sep 2020 17:51:34 +0800	[thread overview]
Message-ID: <1599213094-30144-5-git-send-email-jee.heng.sia@intel.com> (raw)
In-Reply-To: <1599213094-30144-1-git-send-email-jee.heng.sia@intel.com>

Add support for device_synchronize() callback function to sync with
dmaengine_terminate_sync().

Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Reviewed-by: Shevchenko, Andriy <andriy.shevchenko@intel.com>
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 46e2ba9..56b2132 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -347,6 +347,13 @@ static void dma_chan_issue_pending(struct dma_chan *dchan)
 	spin_unlock_irqrestore(&chan->vc.lock, flags);
 }
 
+static void dw_axi_dma_synchronize(struct dma_chan *dchan)
+{
+	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
+
+	vchan_synchronize(&chan->vc);
+}
+
 static int dma_chan_alloc_chan_resources(struct dma_chan *dchan)
 {
 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
@@ -940,6 +947,7 @@ static int dw_probe(struct platform_device *pdev)
 	dw->dma.device_free_chan_resources = dma_chan_free_chan_resources;
 
 	dw->dma.device_prep_dma_memcpy = dma_chan_prep_dma_memcpy;
+	dw->dma.device_synchronize = dw_axi_dma_synchronize;
 
 	platform_set_drvdata(pdev, chip);
 
-- 
1.9.1


  parent reply	other threads:[~2020-09-04 10:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04  9:51 [PATCH 0/4] dmaengine: dw-axi-dmac: Refactor descriptor and channel management Sia Jee Heng
2020-09-04  9:51 ` [PATCH 1/4] dt-bindings: dma: Add YAML schemas for dw-axi-dmac Sia Jee Heng
2020-09-04  9:51 ` [PATCH 2/4] dmaengine: dw-axi-dmac: simplify descriptor management Sia Jee Heng
2020-09-04  9:51 ` [PATCH 3/4] dmaengine: dw-axi-dmac: move dma_pool_create() to alloc_chan_resources() Sia Jee Heng
2020-09-04  9:51 ` Sia Jee Heng [this message]
2020-09-18  2:31 ` [PATCH 0/4] dmaengine: dw-axi-dmac: Refactor descriptor and channel management Sia, Jee Heng
2020-10-28  5:58   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1599213094-30144-5-git-send-email-jee.heng.sia@intel.com \
    --to=jee.heng.sia@intel.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).