1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-09-04 20:42:14 +02:00

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>
This commit is contained in:
Urja Rannikko
2017-05-07 16:56:45 +03:00
parent 304b351254
commit d59fee6aa3
2 changed files with 15 additions and 0 deletions

View File

@@ -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);

View File

@@ -405,6 +405,18 @@ const struct programmer_entry programmer_table[] = {
{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 {