From 5824fbff010076cc0d2a4387c1b2f54644ae5785 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Fri, 21 May 2010 23:09:42 +0000 Subject: 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 --- chipdrivers.h | 1 + 1 file changed, 1 insertion(+) (limited to 'chipdrivers.h') 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 */ -- cgit v1.1