Urja Rannikko has uploaded a new change for review. ( https://review.coreboot.org/19615 )
Change subject: Add probe_dummy for chips that are not practical to probe ......................................................................
Add probe_dummy for chips that are not practical to probe
This is in preparation for read-only definition of a 27C256.
Change-Id: I327400e337d6ce600c4f0f165f328715f5b341e2 Signed-off-by: Urja Rannikko urjaman@gmail.com --- M chipdrivers.h M flashrom.c 2 files changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/15/19615/1
diff --git a/chipdrivers.h b/chipdrivers.h index c85eac9..eeb9d27 100644 --- a/chipdrivers.h +++ b/chipdrivers.h @@ -27,6 +27,9 @@
#include "flash.h" /* for chipaddr and flashctx */
+/* flashrom.c */ +int probe_dummy(struct flashctx *flash); + /* spi.c */ int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); int spi_chip_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); diff --git a/flashrom.c b/flashrom.c index 25e53f2..c8d477d 100644 --- a/flashrom.c +++ b/flashrom.c @@ -405,6 +405,18 @@ {0}, /* This entry corresponds to PROGRAMMER_INVALID. */ };
+/* This is a dummy probe for flash chips that cannot be probed for. */ +int probe_dummy(struct flashctx *flash) +{ + if (!chip_to_probe || strcmp(chip_to_probe, flash->chip->name)) { + msg_cdbg("Cant probe for this chip. Use 'flashrom -c %s' if you have one.\n", flash->chip->name); + return 0; + } + msg_cdbg("selected by user (Note: probing not possible or not implemented).\n"); + return 1; +} + + #define SHUTDOWN_MAXFN 32 static int shutdown_fn_count = 0; struct shutdown_func_data {