From cbf563cbde925dae6971c7df305493a638de51c6 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 16 Jun 2009 08:55:44 +0000 Subject: 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 Acked-by: Uwe Hermann --- it87spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'it87spi.c') diff --git a/it87spi.c b/it87spi.c index ecc1ad8..5183bae 100644 --- a/it87spi.c +++ b/it87spi.c @@ -257,15 +257,15 @@ int it8716f_spi_chip_write_1(struct flashchip *flash, uint8_t *buf) * IT8716F only allows maximum of 512 kb SPI mapped to LPC memory cycles * Need to read this big flash using firmware cycles 3 byte at a time. */ -int it8716f_spi_chip_read(struct flashchip *flash, uint8_t *buf) +int it8716f_spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len) { int total_size = 1024 * flash->total_size; fast_spi = 0; if ((programmer == PROGRAMMER_IT87SPI) || (total_size > 512 * 1024)) { - spi_read_chunked(flash, buf, 3); + spi_read_chunked(flash, buf, start, len, 3); } else { - read_memmapped(flash, buf); + read_memmapped(flash, buf, start, len); } return 0; -- cgit v1.1