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: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
ddata->enabled = false;
err_allow_idle:
- sysc_clkdm_allow_idle(ddata);
-
if (ddata->disable_on_idle)
reset_control_assert(ddata->rsts);
+ sysc_clkdm_allow_idle(ddata);
+
return error;
}
if (ddata->enabled)
return 0;
- if (ddata->disable_on_idle)
- reset_control_deassert(ddata->rsts);
sysc_clkdm_deny_idle(ddata);
+ if (ddata->disable_on_idle)
+ reset_control_deassert(ddata->rsts);
+
if (sysc_opt_clks_needed(ddata)) {
error = sysc_enable_opt_clocks(ddata);
if (error)