summaryrefslogtreecommitdiffstats
path: root/spi.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2008-06-27 16:28:34 +0000
committerStefan Reinauer <stefan.reinauer@coreboot.org>2008-06-27 16:28:34 +0000
commita9424d597de410b07e34c47d7c0613f0595d5d9a (patch)
tree16fc9db04f7ed29f19e454d979e9cc79216addc3 /spi.c
parent325b5d47d81fb4434e722abac9600396da394218 (diff)
downloadast2050-flashrom-a9424d597de410b07e34c47d7c0613f0595d5d9a.zip
ast2050-flashrom-a9424d597de410b07e34c47d7c0613f0595d5d9a.tar.gz
Multiple unrelated changes
* 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) Corresponding to flashrom svn r278 and coreboot v2 svn r3393. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'spi.c')
-rw-r--r--spi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/spi.c b/spi.c
index 01d8e23..1de02a4 100644
--- a/spi.c
+++ b/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__);
OpenPOWER on IntegriCloud