dmaengine: tegra-apb: Clean up suspend-resume
authorDmitry Osipenko <digetx@gmail.com>
Sun, 9 Feb 2020 16:33:50 +0000 (19:33 +0300)
committerVinod Koul <vkoul@kernel.org>
Tue, 25 Feb 2020 06:27:34 +0000 (11:57 +0530)
commitdcb394b6b5fb7fdaac258115ec77e8faff19d2b9
tree08ceaea390ec011322decc4232c4fb7ea6d0bc13
parent84a3f375eea984652bc2889c6b0a1ca7f849eefa
dmaengine: tegra-apb: Clean up suspend-resume

It is enough to check whether hardware is busy on suspend and to reset
it across of suspend-resume because:

  1. Channel's configuration is fully re-programmed on each DMA
     transfer anyways.

  2. Context save-restore of an active channel won't end up well without
     pausing transfer prior to the context's saving, but note that every
     channel shall be idling at the time of suspend, so save-restore is
     not needed at all.

  3. The only case where context save-restore may be useful is when
     channel is in a paused state during suspend. But channel's pausing
     could be supported only on Tegra114+ and this functionality wasn't
     implemented by the driver for years now because there is no need for
     it in upstream kernel.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200209163356.6439-14-digetx@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/tegra20-apb-dma.c