Nick: icon E-mail: none Board: X200 Contents: diff --git a/spi.c b/spi.c index 894f73f6..382e693b 100644 --- a/spi.c +++ b/spi.c @@ -34,6 +34,13 @@ int spi_send_command(struct flashctx *flash, unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr) { + const unsigned char cmd[JEDEC_READ_OUTSIZE] = { JEDEC_READ, 0, 0, 0 }; + unsigned char buf[256]; + + /* keep flash busy for some time */ + flash->mst->spi.command(flash, sizeof(cmd), sizeof(buf), cmd, buf); + + /* actual command */ return flash->mst->spi.command(flash, writecnt, readcnt, writearr, readarr); }