Skip to content

Commit a4a3203

Browse files
Srinivas-Kandagatlabroonie
authored andcommitted
ASoC: codecs: lpass: fix the order or clks turn off during suspend
The order in which clocks are stopped matters as some of the clock like NPL are derived from MCLK. Without this patch, Dragonboard RB5 DSP would crash with below error: qcom_q6v5_pas 17300000.remoteproc: fatal error received: ABT_dal.c:278:ABTimeout: AHB Bus hang is detected, Number of bus hang detected := 2 , addr0 = 0x3370000 , addr1 = 0x0!!! Turn off fsgen first, followed by npl and then finally mclk, which is exactly the opposite order of enable sequence. Fixes: 1dc3459 ("ASoC: codecs: lpass: register mclk after runtime pm") Reported-by: Amit Pundir <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Tested-by: Amit Pundir <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e38c5e8 commit a4a3203

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sound/soc/codecs/lpass-rx-macro.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3670,9 +3670,9 @@ static int __maybe_unused rx_macro_runtime_suspend(struct device *dev)
36703670
regcache_cache_only(rx->regmap, true);
36713671
regcache_mark_dirty(rx->regmap);
36723672

3673-
clk_disable_unprepare(rx->mclk);
3674-
clk_disable_unprepare(rx->npl);
36753673
clk_disable_unprepare(rx->fsgen);
3674+
clk_disable_unprepare(rx->npl);
3675+
clk_disable_unprepare(rx->mclk);
36763676

36773677
return 0;
36783678
}

sound/soc/codecs/lpass-tx-macro.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,9 +2098,9 @@ static int __maybe_unused tx_macro_runtime_suspend(struct device *dev)
20982098
regcache_cache_only(tx->regmap, true);
20992099
regcache_mark_dirty(tx->regmap);
21002100

2101-
clk_disable_unprepare(tx->mclk);
2102-
clk_disable_unprepare(tx->npl);
21032101
clk_disable_unprepare(tx->fsgen);
2102+
clk_disable_unprepare(tx->npl);
2103+
clk_disable_unprepare(tx->mclk);
21042104

21052105
return 0;
21062106
}

sound/soc/codecs/lpass-wsa-macro.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,9 +2506,9 @@ static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev)
25062506
regcache_cache_only(wsa->regmap, true);
25072507
regcache_mark_dirty(wsa->regmap);
25082508

2509-
clk_disable_unprepare(wsa->mclk);
2510-
clk_disable_unprepare(wsa->npl);
25112509
clk_disable_unprepare(wsa->fsgen);
2510+
clk_disable_unprepare(wsa->npl);
2511+
clk_disable_unprepare(wsa->mclk);
25122512

25132513
return 0;
25142514
}

0 commit comments

Comments
 (0)