Commit 5f160cbe authored by Viorel Suman's avatar Viorel Suman Committed by Mark Brown

ASoC: fsl_xcvr: move reset assert into runtime_resume

Move reset assert into runtime_resume since we
cannot rely on reset assert state when the device
is put out from suspend.
Signed-off-by: default avatarViorel Suman <viorel.suman@nxp.com>
Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1613984990-5534-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1372c768
...@@ -1243,10 +1243,6 @@ static __maybe_unused int fsl_xcvr_runtime_suspend(struct device *dev) ...@@ -1243,10 +1243,6 @@ static __maybe_unused int fsl_xcvr_runtime_suspend(struct device *dev)
if (ret < 0) if (ret < 0)
dev_err(dev, "Failed to assert M0+ core: %d\n", ret); dev_err(dev, "Failed to assert M0+ core: %d\n", ret);
ret = reset_control_assert(xcvr->reset);
if (ret < 0)
dev_err(dev, "Failed to assert M0+ reset: %d\n", ret);
regcache_cache_only(xcvr->regmap, true); regcache_cache_only(xcvr->regmap, true);
clk_disable_unprepare(xcvr->spba_clk); clk_disable_unprepare(xcvr->spba_clk);
...@@ -1262,6 +1258,12 @@ static __maybe_unused int fsl_xcvr_runtime_resume(struct device *dev) ...@@ -1262,6 +1258,12 @@ static __maybe_unused int fsl_xcvr_runtime_resume(struct device *dev)
struct fsl_xcvr *xcvr = dev_get_drvdata(dev); struct fsl_xcvr *xcvr = dev_get_drvdata(dev);
int ret; int ret;
ret = reset_control_assert(xcvr->reset);
if (ret < 0) {
dev_err(dev, "Failed to assert M0+ reset: %d\n", ret);
return ret;
}
ret = clk_prepare_enable(xcvr->ipg_clk); ret = clk_prepare_enable(xcvr->ipg_clk);
if (ret) { if (ret) {
dev_err(dev, "failed to start IPG clock.\n"); dev_err(dev, "failed to start IPG clock.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment