Nico Huber has uploaded this change for review.

View Change

[NOTFORMERGE] X200 SPI hack

Send a dummy READ command before any other command.

Change-Id: I28f2e06c5b919bc08ea33ec15713e4dc3b183edd
Signed-off-by: Nico Huber <nico.h@gmx.de>
---
M spi.c
1 file changed, 3 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/51/23151/1
diff --git a/spi.c b/spi.c
index 56f1fdf..4338124 100644
--- a/spi.c
+++ b/spi.c
@@ -34,6 +34,9 @@
unsigned int readcnt, const unsigned char *writearr,
unsigned char *readarr)
{
+ unsigned char dummy[256];
+ const unsigned char readcmd[JEDEC_READ_OUTSIZE] = { JEDEC_READ, };
+ flash->mst->spi.command(flash, sizeof(readcmd), sizeof(dummy), readcmd, dummy);
return flash->mst->spi.command(flash, writecnt, readcnt, writearr,
readarr);
}

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I28f2e06c5b919bc08ea33ec15713e4dc3b183edd
Gerrit-Change-Number: 23151
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>