On Sun, 18 Jan 2015 08:50:57 +0300 Boris Baykov dev@borisbaykov.com wrote:
The patch increases flash read speed via FTDI FT2232H programmer. New ft2232_spi_read function used instead of spi_read_chunked to read by 64k chunks instead of 256b chunks.
According to 3-7 ms FTDI delay for each flash instruction this patch makes read operation faster in about 10 times.
To have stable transfers with 64k buffer SPI frequency should be decreased to 5 MHz. I don't know why but higher freqs aren't working correct. DEFAULT_DIVISOR is changed to 12.
Hi,
thanks for the patch. I see two major problems with it though. First of all the divisor problem has to be investigated. I presume you have only tested with a single hardware setup, right? I'd like to see results from different dongles/setups... and/or a conclusive theory why the problems happens at higher frequencies.
The other thing is the incompatibility of the chunk size... yes, a majority of chips support this, but flashrom prioritizes other things: stability and compatibility. I don't care for the slowness if that's the price for it to work universally with all chips in the wild.
The chunk size problem can be fixed in the long run when we come up with a better infrastructure for this kind of problem (e.g. storing the maximum read chunk size per chip). However, this is not going to happen soon. We have more pressing problems and way too many outstanding patches with a higher priority than speed problems. Therefore I will not commit anything like this soonish and recommend to keep this patch or similar ones applied locally if you need it. This is not very satisfying for anybody but the way it is currently, sorry.