diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2020-02-09 17:33:40 +0100 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-02-25 07:27:32 +0100 |
commit | dda5e35a771043bb5a9e6107fa9f141d8d56b847 (patch) | |
tree | b7d7fac895a8b628557c39be6eb943bfad2ae2b4 /drivers/dma/tegra20-apb-dma.c | |
parent | dmaengine: ti: edma: Support for interleaved mem to mem transfer (diff) | |
download | linux-dda5e35a771043bb5a9e6107fa9f141d8d56b847.tar.xz linux-dda5e35a771043bb5a9e6107fa9f141d8d56b847.zip |
dmaengine: tegra-apb: Implement synchronization hook
The ISR tasklet could be kept scheduled after DMA transfer termination,
let's add synchronization hook which blocks until tasklet is finished.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200209163356.6439-4-digetx@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/tegra20-apb-dma.c')
-rw-r--r-- | drivers/dma/tegra20-apb-dma.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 3a45079d11ec..b18cbfbab004 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -802,6 +802,13 @@ skip_dma_stop: return 0; } +static void tegra_dma_synchronize(struct dma_chan *dc) +{ + struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc); + + tasklet_kill(&tdc->tasklet); +} + static unsigned int tegra_dma_sg_bytes_xferred(struct tegra_dma_channel *tdc, struct tegra_dma_sg_req *sg_req) { @@ -1510,6 +1517,7 @@ static int tegra_dma_probe(struct platform_device *pdev) tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; tdma->dma_dev.device_config = tegra_dma_slave_config; tdma->dma_dev.device_terminate_all = tegra_dma_terminate_all; + tdma->dma_dev.device_synchronize = tegra_dma_synchronize; tdma->dma_dev.device_tx_status = tegra_dma_tx_status; tdma->dma_dev.device_issue_pending = tegra_dma_issue_pending; |