From 9a795d83fbb8842a271d5e037dc983a57b0419fd Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Wed, 14 Jul 2010 16:19:05 +0000 Subject: Convert SPI chips to partial write However, wrap the write functions in a compat layer to allow converting the rest of flashrom later. Tested on Intel NM10 by David Hendricks. Corresponding to flashrom svn r1080. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Michael Karcher --- bitbang_spi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'bitbang_spi.c') diff --git a/bitbang_spi.c b/bitbang_spi.c index f60a7e1..adb1038 100644 --- a/bitbang_spi.c +++ b/bitbang_spi.c @@ -139,10 +139,8 @@ int bitbang_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) return spi_read_chunked(flash, buf, start, len, 64 * 1024); } -int bitbang_spi_write_256(struct flashchip *flash, uint8_t *buf) +int bitbang_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len) { - int total_size = 1024 * flash->total_size; - - msg_pdbg("total_size is %d\n", total_size); - return spi_write_chunked(flash, buf, 0, total_size, 256); + spi_disable_blockprotect(); + return spi_write_chunked(flash, buf, start, len, 256); } -- cgit v1.1