Simon Buhrow has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40477 )
Change subject: ft2232_spi.c: Add ft2232_spi_send_multicommand() ......................................................................
Patch Set 19:
So, the correct way to do this is to implement `.multicommand` instead of `.command`. I would roughly do it as follows:
Loop Put write part of command into buffer. If not last command and read part is empty, Continue with next loop iteration. Execute buffer. Execute read part if any. While not last command.
I uploaded PS18 with my first draft of ft2232_spi_send_multicommand().
Having Patch 40748 in mind, I decided to pack max one read cmd into one ftdi call. This simplifies the readback pointer management as well (readarr). Furthermore I think the majority (all?) calls of ft2232_spi_send_multicommand() will have at most one read cmd (correct me if I´m wrong). (To be honest I´m not sure if ft2232_spi_send_multicommand() is ever called with read cmd in the current implementation)
I´m not sure if the loop condition is safe. It´s copied from default_spi_send_multicommand().
It´s untested!! I´ll do this the next week(s). Comments are welcome.