* [v1] dmaengine: hsu: Support dmaengine_terminate_sync()
@ 2018-07-10 11:49 Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-07-10 11:49 UTC (permalink / raw)
To: Vinod Koul, dmaengine; +Cc: Andy Shevchenko
It appears that the driver misses the support of dmaengine_terminate_sync().
Since many of callers expects this behaviour implement the new
device_synchronize() callback to allow proper synchronization when stopping
a channel.
Fixes: b36f09c3c441 ("dmaengine: Add transfer termination synchronization support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Fixes tag is just an anchor for anyone who would like to see this change
backported.
drivers/dma/hsu/hsu.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/dma/hsu/hsu.c b/drivers/dma/hsu/hsu.c
index 29d04ca71d52..202ffa9f7611 100644
--- a/drivers/dma/hsu/hsu.c
+++ b/drivers/dma/hsu/hsu.c
@@ -413,6 +413,13 @@ static void hsu_dma_free_chan_resources(struct dma_chan *chan)
vchan_free_chan_resources(to_virt_chan(chan));
}
+static void hsu_dma_synchronize(struct dma_chan *chan)
+{
+ struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
+
+ vchan_synchronize(&hsuc->vchan);
+}
+
int hsu_dma_probe(struct hsu_dma_chip *chip)
{
struct hsu_dma *hsu;
@@ -459,6 +466,7 @@ int hsu_dma_probe(struct hsu_dma_chip *chip)
hsu->dma.device_pause = hsu_dma_pause;
hsu->dma.device_resume = hsu_dma_resume;
hsu->dma.device_terminate_all = hsu_dma_terminate_all;
+ hsu->dma.device_synchronize = hsu_dma_synchronize;
hsu->dma.src_addr_widths = HSU_DMA_BUSWIDTHS;
hsu->dma.dst_addr_widths = HSU_DMA_BUSWIDTHS;
^ permalink raw reply related [flat|nested] 2+ messages in thread* [v1] dmaengine: hsu: Support dmaengine_terminate_sync()
@ 2018-07-10 15:40 Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2018-07-10 15:40 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: dmaengine
On 10-07-18, 14:49, Andy Shevchenko wrote:
> It appears that the driver misses the support of dmaengine_terminate_sync().
> Since many of callers expects this behaviour implement the new
> device_synchronize() callback to allow proper synchronization when stopping
> a channel.
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-10 15:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 11:49 [v1] dmaengine: hsu: Support dmaengine_terminate_sync() Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2018-07-10 15:40 Vinod Koul
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).