提交 bbacb8e7 编写于 作者: A Andy Shevchenko 提交者: Vinod Koul

dmaengine: idma64: Support dmaengine_terminate_sync()

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: b36f09c3 ("dmaengine: Add transfer termination synchronization support")
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NVinod Koul <vkoul@kernel.org>
上级 2abc66cd
...@@ -496,6 +496,13 @@ static int idma64_terminate_all(struct dma_chan *chan) ...@@ -496,6 +496,13 @@ static int idma64_terminate_all(struct dma_chan *chan)
return 0; return 0;
} }
static void idma64_synchronize(struct dma_chan *chan)
{
struct idma64_chan *idma64c = to_idma64_chan(chan);
vchan_synchronize(&idma64c->vchan);
}
static int idma64_alloc_chan_resources(struct dma_chan *chan) static int idma64_alloc_chan_resources(struct dma_chan *chan)
{ {
struct idma64_chan *idma64c = to_idma64_chan(chan); struct idma64_chan *idma64c = to_idma64_chan(chan);
...@@ -583,6 +590,7 @@ static int idma64_probe(struct idma64_chip *chip) ...@@ -583,6 +590,7 @@ static int idma64_probe(struct idma64_chip *chip)
idma64->dma.device_pause = idma64_pause; idma64->dma.device_pause = idma64_pause;
idma64->dma.device_resume = idma64_resume; idma64->dma.device_resume = idma64_resume;
idma64->dma.device_terminate_all = idma64_terminate_all; idma64->dma.device_terminate_all = idma64_terminate_all;
idma64->dma.device_synchronize = idma64_synchronize;
idma64->dma.src_addr_widths = IDMA64_BUSWIDTHS; idma64->dma.src_addr_widths = IDMA64_BUSWIDTHS;
idma64->dma.dst_addr_widths = IDMA64_BUSWIDTHS; idma64->dma.dst_addr_widths = IDMA64_BUSWIDTHS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册