mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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 <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
@ -167,3 +167,12 @@ int dummy_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len)
|
||||
return spi_read_chunked(flash, buf, start, len, 64 * 1024);
|
||||
}
|
||||
|
||||
/* Is is impossible to trigger this code path because dummyflasher probing will
|
||||
* never be successful, and the current frontend refuses to write in that case.
|
||||
* Other frontends may allow writing even for non-detected chips, though.
|
||||
*/
|
||||
int dummy_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len)
|
||||
{
|
||||
spi_disable_blockprotect();
|
||||
return spi_write_chunked(flash, buf, start, len, 256);
|
||||
}
|
||||
|
Reference in New Issue
Block a user