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 to save programming time ......................................................................
Patch Set 3:
(4 comments)
Patch Set 2:
(4 comments)
https://review.coreboot.org/c/flashrom/+/40477/2/ft2232_spi.c File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/40477/2/ft2232_spi.c@473 PS2, Line 473:
tab for consistency
Done
https://review.coreboot.org/c/flashrom/+/40477/2/ft2232_spi.c@482 PS2, Line 482: /* 280 Byte = (9 Byte CMD + 1 Byte WREN) + (9 Byte CMD + 1 Byte op) + 4 Byte Addr + 256 Byte PageWrite-data
wrap differently so it fits on 80 columns? (also in line 548)
Done
https://review.coreboot.org/c/flashrom/+/40477/2/ft2232_spi.c@546 PS2, Line 546:
no trailing white space (also elsewhere)
Done
https://review.coreboot.org/c/flashrom/+/40477/2/ft2232_spi.c@549 PS2, Line 549: return 0;
so you're filling in buf, then leaving it hanging and somehow that data re-appears on the next run. […]
Oh, good comment. I was assuming that realloc is called only once (as I assume that the highest writecnt value refers to page write). But if there will be any bigger write operations it will fail. Is there a chance for calls with more than one 256Byte page to write? If yes: May be it´s OK to save only a flag which indicates if WREN was passed in the previous call. And according to that flag the WREN cmd is prepend or not.