summaryrefslogtreecommitdiffstats
path: root/dediprog.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-10-09 12:56:53 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2020-10-12 04:42:39 +0000
commit91c10aebb35893fdabb2d094155745468b90b5f5 (patch)
tree8812b26bd2d22a71cc2cbcc29a3a6e5bb995aca8 /dediprog.c
parent90ac9872cdd2a7dc254c182cec74d2314a3e9b2f (diff)
downloadflashrom-91c10aebb35893fdabb2d094155745468b90b5f5.tar.gz
flashrom-91c10aebb35893fdabb2d094155745468b90b5f5.tar.bz2
flashrom-91c10aebb35893fdabb2d094155745468b90b5f5.zip
dediprog.c: Fix layering violation of default_spi_read
default_spi_read() calls spi_read_chunked() with the correct max_read value of 16 set in the spi master struct. Change-Id: Ic0897f74056e3d723a33c063ed0bd8cb6e88ba45 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/46232 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Sam McNally <sammc@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'dediprog.c')
-rw-r--r--dediprog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dediprog.c b/dediprog.c
index 827d5e495..a9d00349f 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -545,7 +545,7 @@ static int dediprog_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int
if (residue) {
msg_pdbg("Slow read for partial block from 0x%x, length 0x%x\n",
start, residue);
- ret = spi_read_chunked(flash, buf, start, residue, 16);
+ ret = default_spi_read(flash, buf, start, residue);
if (ret)
goto err;
}
@@ -560,8 +560,8 @@ static int dediprog_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int
if (len != 0) {
msg_pdbg("Slow read for partial block from 0x%x, length 0x%x\n",
start, len);
- ret = spi_read_chunked(flash, buf + residue + bulklen,
- start + residue + bulklen, len, 16);
+ ret = default_spi_read(flash, buf + residue + bulklen,
+ start + residue + bulklen, len);
if (ret)
goto err;
}