summaryrefslogtreecommitdiffstats
path: root/chipdrivers.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-05-21 23:09:42 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-05-21 23:09:42 +0000
commit5824fbff010076cc0d2a4387c1b2f54644ae5785 (patch)
tree73c903182e7400386453acfbd7c738b3361849ff /chipdrivers.h
parentd175e06ac305274d8e1a8a4658f7f5518c89b801 (diff)
downloadflashrom-5824fbff010076cc0d2a4387c1b2f54644ae5785.tar.gz
flashrom-5824fbff010076cc0d2a4387c1b2f54644ae5785.tar.bz2
flashrom-5824fbff010076cc0d2a4387c1b2f54644ae5785.zip
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 <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: David Hendricks <dhendrix@google.com>
Diffstat (limited to 'chipdrivers.h')
-rw-r--r--chipdrivers.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/chipdrivers.h b/chipdrivers.h
index 6d5cef0fd..9537775c8 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 */