diff options
author | Rudolf Marek <r.marek@assembler.cz> | 2008-06-30 21:38:30 +0000 |
---|---|---|
committer | Rudolf Marek <r.marek@assembler.cz> | 2008-06-30 21:38:30 +0000 |
commit | 4a17e02003f40495b37393b017e7c9ea4bb85638 (patch) | |
tree | 469840e1fa670fced0e7a9f4793d64de7dd2c3a3 /util/flashrom/spi.c | |
parent | 7b425c1c1115f258107bad368a1b1f7345a7254b (diff) |
This patch adds support for VIA SPI controller on VT8237S. It is similar with
few documented exceptions to ICH7 SPI controller.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3398 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/spi.c')
-rw-r--r-- | util/flashrom/spi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/flashrom/spi.c b/util/flashrom/spi.c index 1de02a4d6d..60fa99028e 100644 --- a/util/flashrom/spi.c +++ b/util/flashrom/spi.c @@ -36,8 +36,8 @@ int spi_command(unsigned int writecnt, unsigned int readcnt, const unsigned char { if (it8716f_flashport) return it8716f_spi_command(writecnt, readcnt, writearr, readarr); - else if (ich7_detected) - return ich_spi_command(writecnt, readcnt, writearr, readarr); + else if ((ich7_detected) || (viaspi_detected)) + return ich_spi_command(writecnt, readcnt, writearr, readarr); else if (ich9_detected) return ich_spi_command(writecnt, readcnt, writearr, readarr); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); @@ -360,8 +360,8 @@ int spi_chip_read(struct flashchip *flash, uint8_t *buf) { if (it8716f_flashport) return it8716f_spi_chip_read(flash, buf); - else if (ich7_detected) - return ich_spi_read(flash, buf); + else if ((ich7_detected) || (viaspi_detected)) + return ich_spi_read(flash, buf); else if (ich9_detected) return ich_spi_read(flash, buf); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); @@ -372,8 +372,8 @@ int spi_chip_write(struct flashchip *flash, uint8_t *buf) { if (it8716f_flashport) return it8716f_spi_chip_write(flash, buf); - else if (ich7_detected) - return ich_spi_write(flash, buf); + else if ((ich7_detected) || (viaspi_detected)) + return ich_spi_write(flash, buf); else if (ich9_detected) return ich_spi_write(flash, buf); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); |