Message ID | 20230111074528.29354-3-roger.lu@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enahance SVS's robustness | expand |
On 11/01/2023 08:45, Roger Lu wrote: > Add svs reset when svs_resume() fail. > > Fixes: a825d72f74a3 ("soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()") > Signed-off-by: Roger Lu <roger.lu@mediatek.com> Applied, thanks! > --- > drivers/soc/mediatek/mtk-svs.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c > index 2df30a6bca28..a803b92afc3d 100644 > --- a/drivers/soc/mediatek/mtk-svs.c > +++ b/drivers/soc/mediatek/mtk-svs.c > @@ -1614,12 +1614,16 @@ static int svs_resume(struct device *dev) > > ret = svs_init02(svsp); > if (ret) > - goto out_of_resume; > + goto svs_resume_reset_assert; > > svs_mon_mode(svsp); > > return 0; > > +svs_resume_reset_assert: > + dev_err(svsp->dev, "assert reset: %d\n", > + reset_control_assert(svsp->rst)); > + > out_of_resume: > clk_disable_unprepare(svsp->main_clk); > return ret;
diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index 2df30a6bca28..a803b92afc3d 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -1614,12 +1614,16 @@ static int svs_resume(struct device *dev) ret = svs_init02(svsp); if (ret) - goto out_of_resume; + goto svs_resume_reset_assert; svs_mon_mode(svsp); return 0; +svs_resume_reset_assert: + dev_err(svsp->dev, "assert reset: %d\n", + reset_control_assert(svsp->rst)); + out_of_resume: clk_disable_unprepare(svsp->main_clk); return ret;
Add svs reset when svs_resume() fail. Fixes: a825d72f74a3 ("soc: mediatek: fix missing clk_disable_unprepare() on err in svs_resume()") Signed-off-by: Roger Lu <roger.lu@mediatek.com> --- drivers/soc/mediatek/mtk-svs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)