1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

Convert SPI byte program to use the multicommand infrastructure

Tested-by: Jakob Bornecrantz <wallbraker@gmail.com>

Corresponding to flashrom svn r651.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested it on Epia-m700 worked okay.
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
This commit is contained in:
Carl-Daniel Hailfinger
2009-07-12 12:06:18 +00:00
parent 39fa9b55cd
commit 2f1b36fb35
6 changed files with 63 additions and 46 deletions

View File

@ -73,10 +73,7 @@ int sb600_spi_write_1(struct flashchip *flash, uint8_t *buf)
printf("Programming flash");
for (i = 0; i < total_size; i++, buf++) {
spi_disable_blockprotect();
result = spi_write_enable();
if (result)
return result;
spi_byte_program(i, *buf);
result = spi_byte_program(i, *buf);
/* wait program complete. */
if (i % 0x8000 == 0)
printf(".");