Attention is currently required from: Felix Singer, Nico Huber, Thomas Heijligen, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67393 )
Change subject: tree/: Move programmer_delay() out of programmer state machine ......................................................................
Patch Set 10: Code-Review+2
(2 comments)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/67393/comment/9f762481_7e4add37 PS9, Line 265: if (flash->mst->buses_supported & BUS_SPI) { : if (flash->mst->spi.delay) : flash->mst->spi.delay(flash, usecs); : } else if (flash->mst->buses_supported & BUS_PARALLEL) { : if (flash->mst->par.delay) : flash->mst->par.delay(flash, usecs); : } else : internal_delay(usecs);
Done?
The difference was for the case when bus is defined, for example BUS_SPI, but custom delay function is NULL. Old logic would call internal_delay in that case, the logic in patchset 9 would call nothing. Latest patchset resolves this.
I know delay functions have a void return type, but it is convenient to use return in this case to avoid more elses and elseifs.
File serprog.c:
https://review.coreboot.org/c/flashrom/+/67393/comment/41f8eb21_b32f0c5b PS9, Line 456: static void serprog_delay(const struct flashctx *flash, unsigned int usecs);
I see, I missed `sp_check_opbuf_usage()`