diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-07-10 07:49:08 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-07-10 11:40:44 -0400 |
commit | 2abc66cd499aa16876e45c6438788902f7d1ce22 (patch) | |
tree | 6872a8714317318e59a88628cb5bd2ace2ce1c41 | |
parent | ce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff) |
dmaengine: hsu: 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: b36f09c3c441 ("dmaengine: Add transfer termination synchronization support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/dma/hsu/hsu.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) | |||
413 | vchan_free_chan_resources(to_virt_chan(chan)); | 413 | vchan_free_chan_resources(to_virt_chan(chan)); |
414 | } | 414 | } |
415 | 415 | ||
416 | static void hsu_dma_synchronize(struct dma_chan *chan) | ||
417 | { | ||
418 | struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan); | ||
419 | |||
420 | vchan_synchronize(&hsuc->vchan); | ||
421 | } | ||
422 | |||
416 | int hsu_dma_probe(struct hsu_dma_chip *chip) | 423 | int hsu_dma_probe(struct hsu_dma_chip *chip) |
417 | { | 424 | { |
418 | struct hsu_dma *hsu; | 425 | struct hsu_dma *hsu; |
@@ -459,6 +466,7 @@ int hsu_dma_probe(struct hsu_dma_chip *chip) | |||
459 | hsu->dma.device_pause = hsu_dma_pause; | 466 | hsu->dma.device_pause = hsu_dma_pause; |
460 | hsu->dma.device_resume = hsu_dma_resume; | 467 | hsu->dma.device_resume = hsu_dma_resume; |
461 | hsu->dma.device_terminate_all = hsu_dma_terminate_all; | 468 | hsu->dma.device_terminate_all = hsu_dma_terminate_all; |
469 | hsu->dma.device_synchronize = hsu_dma_synchronize; | ||
462 | 470 | ||
463 | hsu->dma.src_addr_widths = HSU_DMA_BUSWIDTHS; | 471 | hsu->dma.src_addr_widths = HSU_DMA_BUSWIDTHS; |
464 | hsu->dma.dst_addr_widths = HSU_DMA_BUSWIDTHS; | 472 | hsu->dma.dst_addr_widths = HSU_DMA_BUSWIDTHS; |