Commit b6036314 authored by Tero Kristo's avatar Tero Kristo Committed by Tony Lindgren

bus: ti-sysc: re-order the clkdm control around reset handling

Parenting clockdomain for the IP should be enabled during the reset
handling logic, otherwise the reset may not finish properly. Re-order
the clockdomain control logic to avoid this.
Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent b58056da
...@@ -1090,11 +1090,11 @@ static int __maybe_unused sysc_runtime_suspend(struct device *dev) ...@@ -1090,11 +1090,11 @@ static int __maybe_unused sysc_runtime_suspend(struct device *dev)
ddata->enabled = false; ddata->enabled = false;
err_allow_idle: err_allow_idle:
sysc_clkdm_allow_idle(ddata);
if (ddata->disable_on_idle) if (ddata->disable_on_idle)
reset_control_assert(ddata->rsts); reset_control_assert(ddata->rsts);
sysc_clkdm_allow_idle(ddata);
return error; return error;
} }
...@@ -1108,11 +1108,12 @@ static int __maybe_unused sysc_runtime_resume(struct device *dev) ...@@ -1108,11 +1108,12 @@ static int __maybe_unused sysc_runtime_resume(struct device *dev)
if (ddata->enabled) if (ddata->enabled)
return 0; return 0;
if (ddata->disable_on_idle)
reset_control_deassert(ddata->rsts);
sysc_clkdm_deny_idle(ddata); sysc_clkdm_deny_idle(ddata);
if (ddata->disable_on_idle)
reset_control_deassert(ddata->rsts);
if (sysc_opt_clks_needed(ddata)) { if (sysc_opt_clks_needed(ddata)) {
error = sysc_enable_opt_clocks(ddata); error = sysc_enable_opt_clocks(ddata);
if (error) if (error)
......
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