diff options
author | Edward O'Callaghan <quasisec@google.com> | 2022-08-16 18:23:33 +1000 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-11-01 01:16:26 +0000 |
commit | 594d3357b6a4d883b6b87295bf4b9b6400777d18 (patch) | |
tree | 765d729f5ce7b2e54e176f29e0cb6a2eb75a8ad6 /libflashrom.c | |
parent | 985ad5623f8c2695ffc07d4bdbacbf2d85d4c11a (diff) | |
download | flashrom-594d3357b6a4d883b6b87295bf4b9b6400777d18.tar.gz flashrom-594d3357b6a4d883b6b87295bf4b9b6400777d18.tar.bz2 flashrom-594d3357b6a4d883b6b87295bf4b9b6400777d18.zip |
tree/: Convert flashchip read func ptr to enumerate
This forges the way for flashchips.c to be pure declarative
data and lookup functions for dispatch to be pure. This
means that the flashchips data could be extracted out to
be agnostic data of the flashrom code and algorithms.
TEST='R|W|E && --flash-name' on ARM, AMD & Intel DUT's.
Change-Id: I612d46fefedf2b69e7e2064aa857fa0756efb4e7
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66788
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'libflashrom.c')
-rw-r--r-- | libflashrom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libflashrom.c b/libflashrom.c index 3e28938c9..cbc624309 100644 --- a/libflashrom.c +++ b/libflashrom.c @@ -299,7 +299,7 @@ int flashrom_layout_read_from_ifd(struct flashrom_layout **const layout, struct goto _free_ret; msg_cinfo("Reading ich descriptor... "); - if (flashctx->chip->read(flashctx, desc, 0, 0x1000)) { + if (read_flash(flashctx, desc, 0, 0x1000)) { msg_cerr("Read operation failed!\n"); msg_cinfo("FAILED.\n"); ret = 2; |