Edward O'Callaghan has uploaded this change for review.

View Change

ichspi.c: ich7_run_opcode() fail early on transact error

This patch is adapted from the ChromiumOS fork. While we no longer ship
and support the devices:

- Lenovo S10-t3,
- EEEPC,
- Alex and Mario.

I did however want to preserve the support for the community as the
right thing to do.

Downstream commit d2129f1cc036394fcf3c5232647a6e11eb1674fd
http://codereview.chromium.org/6698020

Change-Id: I93198cb8536705e9b71b7fbe43a20e151c2a72a8
Original-author-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M ichspi.c
1 file changed, 3 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/25/46325/1
diff --git a/ichspi.c b/ichspi.c
index 4209d60..3668a82 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -929,9 +929,11 @@
while (((REGREAD16(ICH7_REG_SPIS) & (SPIS_CDS | SPIS_FCERR)) == 0) &&
--timeout) {
programmer_delay(10);
+ if (REGREAD16(ICH7_REG_SPIS) & SPIS_FCERR)
+ break; /* Transaction error */
}
if (!timeout) {
- msg_perr("timeout, ICH7_REG_SPIS=0x%04x\n",
+ msg_perr("CDS timeout, ICH7_REG_SPIS=0x%04x\n",
REGREAD16(ICH7_REG_SPIS));
return 1;
}

To view, visit change 46325. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I93198cb8536705e9b71b7fbe43a20e151c2a72a8
Gerrit-Change-Number: 46325
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-MessageType: newchange