diff mbox series

[v3,10/14] soc: mediatek: mtk-svs: reset svs when svs_resume() fail

Message ID 20230103112925.16554-11-roger.lu@mediatek.com
State New
Headers show
Series Enhance SVS's robustness | expand

Commit Message

Roger Lu Jan. 3, 2023, 11:29 a.m. UTC
Reset svs when svs_resume() fail.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
---
 drivers/soc/mediatek/mtk-svs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index d8b759897fec..567536e32a46 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -1621,12 +1621,16 @@  static int svs_resume(struct device *dev)
 
 	ret = svs_init02(svsp);
 	if (ret)
-		goto svs_resume_clk_disable;
+		goto svs_resume_reset_assert;
 
 	svs_mon_mode(svsp);
 
 	return 0;
 
+svs_resume_reset_assert:
+	dev_info(svsp->dev, "assert reset %d\n",
+		 reset_control_assert(svsp->rst));
+
 svs_resume_clk_disable:
 	svs_clk_disable(svsp);