diff options
author | Tero Kristo <t-kristo@ti.com> | 2019-08-07 15:46:03 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2019-08-13 04:32:03 -0700 |
commit | b6036314436b9f4d8dbb8f1bdea511982de73cf9 (patch) | |
tree | 77e0d9baafd215259d2e810673e0b15e07cb561f /drivers/bus/ti-sysc.c | |
parent | b58056da2ec28e2c1b66096cd5109997f04d3fd1 (diff) | |
download | linux-b6036314436b9f4d8dbb8f1bdea511982de73cf9.tar.gz |
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: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus/ti-sysc.c')
-rw-r--r-- | drivers/bus/ti-sysc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 35997a2b2dc4..d7f6b04f13fd 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -1090,11 +1090,11 @@ static int __maybe_unused sysc_runtime_suspend(struct device *dev) 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; } @@ -1108,11 +1108,12 @@ static int __maybe_unused sysc_runtime_resume(struct device *dev) 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) |