1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +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:
Carl-Daniel Hailfinger
2009-06-16 08:55:44 +00:00
parent 30f7cb2f3c
commit cbf563cbde
7 changed files with 48 additions and 35 deletions

View File

@ -39,10 +39,10 @@ struct sb600_spi_controller {
struct sb600_spi_controller *spi_bar = NULL;
uint8_t *sb600_spibar;
int sb600_spi_read(struct flashchip *flash, uint8_t *buf)
int sb600_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len)
{
/* Maximum read length is 8 bytes. */
return spi_read_chunked(flash, buf, 8);
return spi_read_chunked(flash, buf, start, len, 8);
}
uint8_t sb600_read_status_register(void)