OSDN Git Service

dmaengine: tegra210-adma: restore channel status
authorSameer Pujar <spujar@nvidia.com>
Thu, 2 May 2019 12:55:17 +0000 (18:25 +0530)
committerVinod Koul <vkoul@kernel.org>
Sat, 4 May 2019 10:43:42 +0000 (16:13 +0530)
commitf33e7bb3eb922618612a90f0a828c790e8880773
treec3d9cf2217940d48c1d143caa43a5c4d9cedc519
parentf030e419501cb95e961e9ed35c493b5d46a04eca
dmaengine: tegra210-adma: restore channel status

Status of ADMA channel registers is not saved and restored during system
suspend. During active playback if system enters suspend, this results in
wrong state of channel registers during system resume and playback fails
to resume properly. Fix this by saving following channel registers in
runtime suspend and restore during runtime resume.
 * ADMA_CH_LOWER_SRC_ADDR
 * ADMA_CH_LOWER_TRG_ADDR
 * ADMA_CH_FIFO_CTRL
 * ADMA_CH_CONFIG
 * ADMA_CH_CTRL
 * ADMA_CH_CMD
 * ADMA_CH_TC
Runtime PM calls will be inovked during system resume path if a playback
or capture needs to be resumed. Hence above changes work fine for system
suspend case.

Fixes: f46b195799b5 ("dmaengine: tegra-adma: Add support for Tegra210 ADMA")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/tegra210-adma.c