path: root/chipdrivers.h
diff options
authorCarl-Daniel Hailfinger <>2010-05-21 23:09:42 +0000
committerCarl-Daniel Hailfinger <>2010-05-21 23:09:42 +0000
commit5824fbff010076cc0d2a4387c1b2f54644ae5785 (patch)
tree73c903182e7400386453acfbd7c738b3361849ff /chipdrivers.h
parentd175e06ac305274d8e1a8a4658f7f5518c89b801 (diff)
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 <>
Diffstat (limited to 'chipdrivers.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/chipdrivers.h b/chipdrivers.h
index 6d5cef0..9537775 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -51,6 +51,7 @@ int spi_byte_program(int addr, uint8_t databyte);
int spi_nbyte_program(int addr, uint8_t *bytes, int len);
int spi_nbyte_read(int addr, uint8_t *bytes, int len);
int spi_read_chunked(struct flashchip *flash, uint8_t *buf, int start, int len, int chunksize);
+int spi_write_chunked(struct flashchip *flash, uint8_t *buf, int start, int len, int chunksize);
int spi_aai_write(struct flashchip *flash, uint8_t *buf);
/* 82802ab.c */
OpenPOWER on IntegriCloud