dediprog: support new communication protocol, cleanup and enable by default
The new protocol changes some commands, so adjust the code to support
these. Use helper functions to reduce duplication in libusb calls. Testing
with real hardware showed that the maximum read size via the control
endpoint is about 16 bytes although specification does not mention that.
Dediprog SF600 is not supported yet.
Based on the following chromiumos changes:
Additionally, some ideas from Alex for cleaner code were incorporated as well.
Tested on an SF100 V4 with both firmware generations PREWing a M25PX80
and AT45DB041D (the latter is using dediprog_spi_send_command() instead
of optimized functions which make it a good test vehicle).
Corresponding to flashrom svn r1918.
Signed-off-by: Simon Glass <firstname.lastname@example.org>
Signed-off-by: David Hendricks <email@example.com>
Signed-off-by: Alexandru Gagniuc <firstname.lastname@example.org>
Signed-off-by: Stefan Tauner <email@example.com>
Acked-by: Stefan Tauner <firstname.lastname@example.org>
2 files changed