[PATCH v3 1/5] reset: Add reset_reset() and reset_reset_bulk() API
Maarten Brock
Maarten.Brock at sttls.nl
Mon May 18 14:07:00 CEST 2026
Hello Michal,
> -----Original Message-----
> From: Michal Simek <michal.simek at amd.com>
> On 5/18/26 12:21, Maarten Brock wrote:
> >
> > Although properly commented, I find the reset_reset_bulk() implementation
> > counterintuitive. Are we so certain that the Linux implementation is the right
> > and obvious one? I personally would prefer to have it assert all resets at the
> > same time. It is faster and prevents races if the resets are interdependent.
>
> Why do you think that it is faster?
>
> I expect you would like to do it like this right?
>
> int reset_reset_bulk(struct reset_ctl_bulk *bulk, ulong delay_us)
> {
> int ret;
>
> ret = reset_assert_bulk(bulk);
> if (ret) {
> dev_err(bus, "Failed to assert reset: %d\n", ret);
> return ret;
> }
>
> udelay(delay_us);
>
> /* Deassert all OSPI reset lines */
> ret = reset_deassert_bulk(bulk);
> if (ret) {
> dev_err(bus, "Failed to deassert reset: %d\n", ret);
> return ret;
> }
>
> return 0;
> }
That is correct.
And a single delay of delay_us takes less time than N*delay_us (for N>1), so the total startup time is smaller (a.k.a. faster startup).
Kind regards,
Maarten Brock
More information about the U-Boot
mailing list