Skip to content

Commit d777725

Browse files
Srinivas-Kandagatlagregkh
authored andcommitted
slimbus: ngd: reset dma setup during runtime pm
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: 917809e ("slimbus: ngd: Add qcom SLIMBus NGD driver") Cc: <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c0e38ea commit d777725

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/slimbus/qcom-ngd-ctrl.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,8 @@ static void qcom_slim_ngd_setup(struct qcom_slim_ngd_ctrl *ctrl)
10801080
{
10811081
u32 cfg = readl_relaxed(ctrl->ngd->base);
10821082

1083-
if (ctrl->state == QCOM_SLIM_NGD_CTRL_DOWN)
1083+
if (ctrl->state == QCOM_SLIM_NGD_CTRL_DOWN ||
1084+
ctrl->state == QCOM_SLIM_NGD_CTRL_ASLEEP)
10841085
qcom_slim_ngd_init_dma(ctrl);
10851086

10861087
/* By default enable message queues */
@@ -1131,6 +1132,7 @@ static int qcom_slim_ngd_power_up(struct qcom_slim_ngd_ctrl *ctrl)
11311132
dev_info(ctrl->dev, "Subsys restart: ADSP active framer\n");
11321133
return 0;
11331134
}
1135+
qcom_slim_ngd_setup(ctrl);
11341136
return 0;
11351137
}
11361138

@@ -1618,6 +1620,7 @@ static int __maybe_unused qcom_slim_ngd_runtime_suspend(struct device *dev)
16181620
struct qcom_slim_ngd_ctrl *ctrl = dev_get_drvdata(dev);
16191621
int ret = 0;
16201622

1623+
qcom_slim_ngd_exit_dma(ctrl);
16211624
if (!ctrl->qmi.handle)
16221625
return 0;
16231626

0 commit comments

Comments
 (0)