Re: [PATCH 09/14] bus: ti-sysc: Move rstctrl reset to happen later
From: Tony Lindgren
Date: Tue Mar 26 2019 - 19:13:13 EST
* Tony Lindgren <tony@xxxxxxxxxxx> [190325 22:00]:
> We should not do the reset until the clocks are enabled. Let's only init
> restctrl in sysc_init_resets() and do the reset later on in sysc_reset().
...
> static int sysc_reset(struct sysc *ddata)
> {
> int offset = ddata->offsets[SYSC_SYSCONFIG];
> - int val;
> + int error, val;
>
> if (ddata->legacy_mode || offset < 0 ||
> ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT)
> - return 0;
> + return sysc_rstctrl_reset_deassert(ddata, false);
> +
> + error = sysc_rstctrl_reset_deassert(ddata, true);
> + if (error)
> + return error;
This change is wrong, we need to deassert rstctrl reset before
we enable clocks, not after. Updated version below.
Regards,
Tony
8< --------------------