Just a try to show what effect the change has:
To do one PageProgram the Flash needs the following cmds/information (PROG=PageProgramCmd):
Flash-Cmds: JEDEC_WREN + PROG + ADDR + DATA
As flashrom communicates with the FTDI, there are additional FTDI-cmds necessary, of course.
This gives the following calls:
ft2232_spi_send_command(XX, XX, ['JEDEC_WREN'], XX)
before: -> send_buf(XX, [FTDI-CMD + 'JEDEC_WREN' + FTDI-CMD], 10)
now: -> save i and buf as they are static, no further function call; buf = [FTDI-CMD + 'JEDEC_WREN' + FTDI-CMD]
ft2232_spi_send_command(XX, XX, ['PROG', 'ADDR', 'DATA'], XX)
before: -> send_buf(XX, [FTDI-CMD + 'PROG' + 'ADDR' + 'DATA' + FTDI-CMD], 270)
now: -> send_buf(XX, [FTDI-CMD + 'JEDEC_WREN' + FTDI-CMD + FTDI-CMD + 'PROG' + 'ADDR' + 'DATA' + FTDI-CMD], 280)
=> saves one send_buf/ftdi_write_data call every page-program or erase action.
To view, visit change 40477. To unsubscribe, or for help writing mail filters, visit settings.