summaryrefslogtreecommitdiffstats
path: root/fmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fmap.c')
-rw-r--r--fmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fmap.c b/fmap.c
index 69824ea82..7f5df2b5b 100644
--- a/fmap.c
+++ b/fmap.c
@@ -167,7 +167,7 @@ static int fmap_lsearch_rom(struct fmap **fmap_out,
goto _finalize_ret;
}
- ret = flashctx->chip->read(flashctx, buf + rom_offset, rom_offset, len);
+ ret = read_flash(flashctx, buf + rom_offset, rom_offset, len);
if (ret) {
msg_pdbg("Cannot read ROM contents.\n");
goto _free_ret;
@@ -232,7 +232,7 @@ static int fmap_bsearch_rom(struct fmap **fmap_out, struct flashctx *const flash
/* Read errors are considered non-fatal since we may
* encounter locked regions and want to continue. */
- if (flashctx->chip->read(flashctx, (uint8_t *)fmap, offset, sig_len)) {
+ if (read_flash(flashctx, (uint8_t *)fmap, offset, sig_len)) {
/*
* Print in verbose mode only to avoid excessive
* messages for benign errors. Subsequent error
@@ -245,7 +245,7 @@ static int fmap_bsearch_rom(struct fmap **fmap_out, struct flashctx *const flash
if (memcmp(fmap, FMAP_SIGNATURE, sig_len) != 0)
continue;
- if (flashctx->chip->read(flashctx, (uint8_t *)fmap + sig_len,
+ if (read_flash(flashctx, (uint8_t *)fmap + sig_len,
offset + sig_len, sizeof(*fmap) - sig_len)) {
msg_cerr("Cannot read %zu bytes at offset %06zx\n",
sizeof(*fmap) - sig_len, offset + sig_len);
@@ -277,7 +277,7 @@ static int fmap_bsearch_rom(struct fmap **fmap_out, struct flashctx *const flash
goto _free_ret;
}
- if (flashctx->chip->read(flashctx, (uint8_t *)fmap + sizeof(*fmap),
+ if (read_flash(flashctx, (uint8_t *)fmap + sizeof(*fmap),
offset + sizeof(*fmap), fmap_len - sizeof(*fmap))) {
msg_cerr("Cannot read %zu bytes at offset %06zx\n",
fmap_len - sizeof(*fmap), offset + sizeof(*fmap));