summaryrefslogtreecommitdiffstats
path: root/wbsio_spi.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-07-12 12:06:18 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-07-12 12:06:18 +0000
commit2f1b36fb35873c599442e1828756c1993524cd5e (patch)
tree836e46a0ba0fcd1ce41a52eddcb3437c2d08e2e5 /wbsio_spi.c
parent39fa9b55cd4c049f43124b873b464641fc9f79a9 (diff)
downloadast2050-flashrom-2f1b36fb35873c599442e1828756c1993524cd5e.zip
ast2050-flashrom-2f1b36fb35873c599442e1828756c1993524cd5e.tar.gz
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>
Diffstat (limited to 'wbsio_spi.c')
-rw-r--r--wbsio_spi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/wbsio_spi.c b/wbsio_spi.c
index cbdddd2..7876198 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -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);
}
OpenPOWER on IntegriCloud