summaryrefslogtreecommitdiffstats
path: root/serprog.c
diff options
context:
space:
mode:
authorBoris Baykov <dev@borisbaykov.com>2016-08-26 16:25:06 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2017-05-02 14:20:15 -0500
commit9dedbdb2bc4a96ae864b64cbb15fa9945695f3dc (patch)
tree1ac40f7bc28856f73a44be208ba83d2d5678c4cd /serprog.c
parentf5dd7ce11b65ffd6ead214b4b4cbe90f3eb110dd (diff)
downloadast2050-flashrom-9dedbdb2bc4a96ae864b64cbb15fa9945695f3dc.zip
ast2050-flashrom-9dedbdb2bc4a96ae864b64cbb15fa9945695f3dc.tar.gz
4ba patches
https://patchwork.coreboot.org/patch/4459 https://patchwork.coreboot.org/patch/4461 https://patchwork.coreboot.org/patch/4463 https://patchwork.coreboot.org/patch/4460 https://patchwork.coreboot.org/patch/4464 https://patchwork.coreboot.org/patch/4462 Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Change-Id: I2b69a7a537726349742edc3a00054c39b732ac36
Diffstat (limited to 'serprog.c')
-rw-r--r--serprog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/serprog.c b/serprog.c
index 98aac83..c9d98bf 100644
--- a/serprog.c
+++ b/serprog.c
@@ -945,7 +945,10 @@ static int serprog_spi_read(struct flashctx *flash, uint8_t *buf,
for (i = 0; i < len; i += cur_len) {
int ret;
cur_len = min(max_read, (len - i));
- ret = spi_nbyte_read(flash, start + i, buf + i, cur_len);
+ ret = (flash->chip->feature_bits & FEATURE_4BA_SUPPORT) == 0
+ ? spi_nbyte_read(flash, start + i, buf + i, cur_len)
+ : flash->chip->four_bytes_addr_funcs.read_nbyte(flash,
+ start + i, buf + i, cur_len);
if (ret)
return ret;
}
OpenPOWER on IntegriCloud