mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
slimbus: ngd: reset dma setup during runtime pm
[ Upstream commitd77772538f
] During suspend/resume NGD remote instance is power cycled along with remotely controlled bam dma engine. So Reset the dma configuration during this suspend resume path so that we are not dealing with any stale dma setup. Without this transactions timeout after first suspend resume path. Fixes:917809e228
("slimbus: ngd: Add qcom SLIMBus NGD driver") Cc: <stable@vger.kernel.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210809082428.11236-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
45d6fc21cd
commit
0775bc462a
1 changed files with 4 additions and 1 deletions
|
@ -1065,7 +1065,8 @@ static void qcom_slim_ngd_setup(struct qcom_slim_ngd_ctrl *ctrl)
|
|||
{
|
||||
u32 cfg = readl_relaxed(ctrl->ngd->base);
|
||||
|
||||
if (ctrl->state == QCOM_SLIM_NGD_CTRL_DOWN)
|
||||
if (ctrl->state == QCOM_SLIM_NGD_CTRL_DOWN ||
|
||||
ctrl->state == QCOM_SLIM_NGD_CTRL_ASLEEP)
|
||||
qcom_slim_ngd_init_dma(ctrl);
|
||||
|
||||
/* By default enable message queues */
|
||||
|
@ -1116,6 +1117,7 @@ static int qcom_slim_ngd_power_up(struct qcom_slim_ngd_ctrl *ctrl)
|
|||
dev_info(ctrl->dev, "Subsys restart: ADSP active framer\n");
|
||||
return 0;
|
||||
}
|
||||
qcom_slim_ngd_setup(ctrl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1506,6 +1508,7 @@ static int __maybe_unused qcom_slim_ngd_runtime_suspend(struct device *dev)
|
|||
struct qcom_slim_ngd_ctrl *ctrl = dev_get_drvdata(dev);
|
||||
int ret = 0;
|
||||
|
||||
qcom_slim_ngd_exit_dma(ctrl);
|
||||
if (!ctrl->qmi.handle)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue