Introduce a generic SPI read function: spi_write_chunked()

Every SPI programmer driver had its own completely different chip write
implementation, and all of them were insufficiently commented. Create
spi_write_chunked as a copy of spi_read_chunked and convert all SPI
programmers to use it. No functional changes except: - Bus Pirate uses
12 Byte writes instead of 8 Byte writes - SB600 uses 5 Byte writes
instead of 1 Byte writes

Corresponding to flashrom svn r1005.

Signed-off-by: Carl-Daniel Hailfinger <>
Acked-by: Michael Karcher <>
Acked-by: David Hendricks <>
7 files changed