diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-06-27 16:28:34 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2008-06-27 16:28:34 +0000 |
commit | a1dd9142c67a6651a1ea7884aa11ba41b597a1bf (patch) | |
tree | 1a3608d02b65ab205d5d23ef50b66aaf47cafc16 /util/flashrom/spi.c | |
parent | 20e0599e69785d8aefc97a09cc06468298f241d6 (diff) |
* ICH7 SPI support
* fix some variable names in ichspi.c (Offset -> offset)
* Dump ICH7 SPI bar with -V
* Improve error message in case IOPL goes wrong. (It might not even be an IOPL)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3393 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/spi.c')
-rw-r--r-- | util/flashrom/spi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/flashrom/spi.c b/util/flashrom/spi.c index 01d8e234aa..1de02a4d6d 100644 --- a/util/flashrom/spi.c +++ b/util/flashrom/spi.c @@ -2,6 +2,7 @@ * This file is part of the flashrom project. * * Copyright (C) 2007, 2008 Carl-Daniel Hailfinger + * Copyright (C) 2008 coresystems GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,6 +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 (ich9_detected) return ich_spi_command(writecnt, readcnt, writearr, readarr); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); @@ -357,6 +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 (ich9_detected) return ich_spi_read(flash, buf); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); @@ -367,6 +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 (ich9_detected) return ich_spi_write(flash, buf); printf_debug("%s called, but no SPI chipset detected\n", __FUNCTION__); |