diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-07-12 12:06:18 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-07-12 12:06:18 +0000 |
commit | 2f1b36fb35873c599442e1828756c1993524cd5e (patch) | |
tree | 836e46a0ba0fcd1ce41a52eddcb3437c2d08e2e5 /it87spi.c | |
parent | 39fa9b55cd4c049f43124b873b464641fc9f79a9 (diff) | |
download | flashrom-2f1b36fb35873c599442e1828756c1993524cd5e.tar.gz flashrom-2f1b36fb35873c599442e1828756c1993524cd5e.tar.bz2 flashrom-2f1b36fb35873c599442e1828756c1993524cd5e.zip |
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 'it87spi.c')
-rw-r--r-- | it87spi.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -232,6 +232,7 @@ static int it8716f_spi_page_program(struct flashchip *flash, int block, uint8_t result = spi_write_enable(); if (result) return result; + /* FIXME: The command below seems to be redundant or wrong. */ OUTB(0x06, it8716f_flashport + 1); OUTB(((2 + (fast_spi ? 1 : 0)) << 4), it8716f_flashport); for (i = 0; i < 256; i++) { @@ -262,10 +263,7 @@ int it8716f_spi_chip_write_1(struct flashchip *flash, uint8_t *buf) spi_disable_blockprotect(); for (i = 0; i < total_size; i++) { - result = spi_write_enable(); - if (result) - return result; - spi_byte_program(i, buf[i]); + result = spi_byte_program(i, buf[i]); while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP) programmer_delay(10); } |