mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 06:01: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:
@ -200,11 +200,8 @@ int wbsio_spi_write_1(struct flashchip *flash, uint8_t *buf)
|
||||
fprintf(stderr, "ERASE FAILED!\n");
|
||||
return -1;
|
||||
}
|
||||
result = spi_write_enable();
|
||||
if (result)
|
||||
return result;
|
||||
for (pos = 0; pos < size; pos++) {
|
||||
spi_byte_program(pos, buf[pos]);
|
||||
result = spi_byte_program(pos, buf[pos]);
|
||||
while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
|
||||
programmer_delay(10);
|
||||
}
|
||||
|
Reference in New Issue
Block a user