mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +02:00
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>
This commit is contained in:
4
ichspi.c
4
ichspi.c
@ -647,14 +647,14 @@ static int ich_spi_write_page(struct flashchip *flash, uint8_t * bytes,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ich_spi_read(struct flashchip *flash, uint8_t * buf)
|
||||
int ich_spi_read(struct flashchip *flash, uint8_t * buf, int start, int len)
|
||||
{
|
||||
int maxdata = 64;
|
||||
|
||||
if (spi_controller == SPI_CONTROLLER_VIA)
|
||||
maxdata = 16;
|
||||
|
||||
return spi_read_chunked(flash, buf, maxdata);
|
||||
return spi_read_chunked(flash, buf, start, len, maxdata);
|
||||
}
|
||||
|
||||
int ich_spi_write_256(struct flashchip *flash, uint8_t * buf)
|
||||
|
Reference in New Issue
Block a user