Hello Michal,

> -----Original Message-----
> From: Michal Simek <[email protected]>
> 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

Reply via email to