Simon Buhrow has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40477 )
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call ......................................................................
Patch Set 13:
(4 comments)
Thanks for your ideas!
https://review.coreboot.org/c/flashrom/+/40477/11/ft2232_spi.c File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/40477/11/ft2232_spi.c@403 PS11, Line 403: if (ftdi_write_data_set_chunksize(ftdic, 280)) { : /* : * 280 bytes = : * + 9 B (CMD) : * + 1 B (WREN) : * + 9 B (CMD) : * + 1 B (op) : * + 4 B (addr) : * + 256 B (page data) : * : * With op: PageProgram or Erase; CMD: FTDI-Chip commands : */
Increasing the chunksize can be the 1st commit
This goes with the time saving changes in ft2232_spi_send_command() below. That´s why I think your proposed 1st and 3rd commit go together.
https://review.coreboot.org/c/flashrom/+/40477/11/ft2232_spi.c@481 PS11, Line 481: static unsigned char buf[FTDI_HW_BUFFER_SIZE];
Using a fixed-size buffer can be the 2nd commit
Done. OK, I see that this does not necessarily go with the time saving changes! Thanks!
https://review.coreboot.org/c/flashrom/+/40477/11/ft2232_spi.c@483 PS11, Line 483: static int i = 0;
This line is part of the 3rd commit
Done
https://review.coreboot.org/c/flashrom/+/40477/11/ft2232_spi.c@541 PS11, Line 541: if (writearr[0] == JEDEC_WREN) { : /* Return to get second op (Program or Erase) without resetting buf nor i*/ : return 0; : } else { : ret = send_buf(ftdic, buf, i); : i = 0; : }
This is the rest of the 3rd commit
Done. This is the main part of time saving change.