On Tue, Jul 13, 2021 at 2:06 PM Daniel Thompson
<daniel.thomp...@linaro.org> wrote:
>
> On Tue, Jul 13, 2021 at 11:45:14AM +0800, Patrick Star wrote:
> >
<snip>
> > BTW: I don't have Bus Pirate, instead I use a self-made programmer from
> > https://github.com/dword1511/stm32-vserprog
>
> Interesting (and duely noted in case I need it).
>
> Assuming the dominant caller of the delay functions is via
> serprog_delay() then it looks like flashrom would avoid using
> internal_delay() entirely if you could add an implementation of
> S_CMD_O_DELAY to this firmware. I think the effect of that would be that
> STM32 would do the spinning so the host doesn't have to.

Because historical stuff (serprog being designed for the
parallel/LPC/FWH flashes carldani talked about, not SPI :) ),
you will need to also have the opbuf init and exec commands, but you
do not need an actual opbuf (operation buffer),
a single delay variable is enough, there is an implementation of that
in libfrser:
https://github.com/urjaman/libfrser/blob/master/frser.c#L401

And this is why I'd prefer serprog implementations to be actually
atleast based on libfrser ;)

-- 
Urja Rannikko
_______________________________________________
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org

Reply via email to