From b46acba6e0da846f5c29f26ac8ec11733adc19f6 Mon Sep 17 00:00:00 2001 From: Dominik Geyer Date: Fri, 16 May 2008 12:55:55 +0000 Subject: Add support for SPI chips on ICH9 This is done by using the generic SPI interface. Corresponding to flashrom svn r239 and coreboot v2 svn r3325. Signed-off-by: Dominik Geyer Acked-by: Carl-Daniel Hailfinger --- spi.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spi.c') diff --git a/spi.c b/spi.c index f50414cb..3a25a100 100644 --- a/spi.c +++ b/spi.c @@ -35,6 +35,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 (ich9_detected) + return ich_spi_command(writecnt, readcnt, writearr, readarr); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); return 1; } @@ -349,6 +351,8 @@ int spi_chip_read(struct flashchip *flash, uint8_t *buf) { if (it8716f_flashport) return it8716f_spi_chip_read(flash, buf); + else if (ich9_detected) + return ich_spi_read(flash, buf); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); return 1; } @@ -357,6 +361,8 @@ int spi_chip_write(struct flashchip *flash, uint8_t *buf) { if (it8716f_flashport) return it8716f_spi_chip_write(flash, buf); + else if (ich9_detected) + return ich_spi_write(flash, buf); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); return 1; } -- cgit v1.2.3