diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-06-16 08:55:44 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-06-16 08:55:44 +0000 |
commit | cbf563cbde925dae6971c7df305493a638de51c6 (patch) | |
tree | 29b0a806979474c3d8dcbc6acfa7022728ca4a15 /wbsio_spi.c | |
parent | 30f7cb2f3c570c99b61bd5df72621f44f1bdd0d0 (diff) | |
download | flashrom-cbf563cbde925dae6971c7df305493a638de51c6.tar.gz flashrom-cbf563cbde925dae6971c7df305493a638de51c6.tar.bz2 flashrom-cbf563cbde925dae6971c7df305493a638de51c6.zip |
Support reads of arbitrary range
That means you can tell flashrom to read exactly bytes 12345-56789
(start 12345, length 44445) and it will not fetch a single byte more.
Uwe tested this on one LPC, one SPI, and one parallel flash board.
Corresponding to flashrom svn r596.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'wbsio_spi.c')
-rw-r--r-- | wbsio_spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wbsio_spi.c b/wbsio_spi.c index 8ca0abcb7..9ac15d198 100644 --- a/wbsio_spi.c +++ b/wbsio_spi.c @@ -173,7 +173,7 @@ int wbsio_spi_command(unsigned int writecnt, unsigned int readcnt, return 0; } -int wbsio_spi_read(struct flashchip *flash, uint8_t *buf) +int wbsio_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) { int size = flash->total_size * 1024; @@ -182,7 +182,7 @@ int wbsio_spi_read(struct flashchip *flash, uint8_t *buf) return 1; } - read_memmapped(flash, buf); + read_memmapped(flash, buf, start, len); return 0; } |