Revert "i2c: tegra: Synchronize DMA before termination"
authorWolfram Sang <wsa@the-dreams.de>
Mon, 27 Apr 2020 08:48:22 +0000 (10:48 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 28 Apr 2020 11:31:16 +0000 (13:31 +0200)
This reverts commit 8814044fe0fa182abc9ff818d3da562de98bc9a7 because
regressions were showing up.

Suggested-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/dmaengine/20200319201140.17451-1-digetx@gmail.com/
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-tegra.c

index 8280ac7..a795b4e 100644 (file)
@@ -1219,15 +1219,6 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev,
                time_left = tegra_i2c_wait_completion_timeout(
                                i2c_dev, &i2c_dev->dma_complete, xfer_time);
 
-               /*
-                * Synchronize DMA first, since dmaengine_terminate_sync()
-                * performs synchronization after the transfer's termination
-                * and we want to get a completion if transfer succeeded.
-                */
-               dmaengine_synchronize(i2c_dev->msg_read ?
-                                     i2c_dev->rx_dma_chan :
-                                     i2c_dev->tx_dma_chan);
-
                dmaengine_terminate_sync(i2c_dev->msg_read ?
                                         i2c_dev->rx_dma_chan :
                                         i2c_dev->tx_dma_chan);