1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 06:01: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:
Carl-Daniel Hailfinger
2010-07-14 16:19:05 +00:00
parent 1748c5701f
commit 9a795d83fb
13 changed files with 126 additions and 130 deletions

View File

@ -189,16 +189,14 @@ int wbsio_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len)
return read_memmapped(flash, buf, start, len);
}
int wbsio_spi_write_1(struct flashchip *flash, uint8_t *buf)
int wbsio_spi_write_1(struct flashchip *flash, uint8_t *buf, int start, int len)
{
int size = flash->total_size * 1024;
if (size > 1024 * 1024) {
if (flash->total_size * 1024 > 1024 * 1024) {
msg_perr("%s: Winbond saved on 4 register bits so max chip size is 1024 KB!\n", __func__);
return 1;
}
return spi_chip_write_1(flash, buf);
return spi_chip_write_1_new(flash, buf, start, len);
}
#endif