summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kepplinger <martink@posteo.de>2017-06-30 14:12:33 +0200
committerMartin Roth <martinroth@google.com>2017-07-02 19:30:08 +0000
commitd9d351d2512af0804f00f0561b66ab18ba879dce (patch)
tree83130bafe2ffd960c1fa866b533b3726a78ade21
parente7d0a37501afa7670363626e678f822a3cb3a0c9 (diff)
downloadcoreboot-d9d351d2512af0804f00f0561b66ab18ba879dce.tar.xz
soc/intel/quark/spi.c: Explain a read in order to flush buffers
In order for this (seemingly unnecessary) status assignment to stay, let's explain it in a comment. Change-Id: I0a364539c37005cfd637b75c8cc23b84e274294d Signed-off-by: Martin Kepplinger <martink@posteo.de> Reviewed-on: https://review.coreboot.org/20411 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r--src/soc/intel/quark/spi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/soc/intel/quark/spi.c b/src/soc/intel/quark/spi.c
index 1d257a563e..c943567e1d 100644
--- a/src/soc/intel/quark/spi.c
+++ b/src/soc/intel/quark/spi.c
@@ -166,7 +166,10 @@ static int xfer(const struct spi_slave *slave, const void *dout,
ctrlr->address = (data[0] << 16)
| (data[1] << 8)
| data[2];
+
+ /* read in order to flush the write buffer */
status = ctrlr->address;
+
data += 3;
bytesout -= 3;
}