mirror of
https://review.coreboot.org/flashrom.git
synced 2025-09-07 05:50:44 +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:
@@ -27,6 +27,9 @@
|
|||||||
|
|
||||||
#include "flash.h" /* for chipaddr and flashctx */
|
#include "flash.h" /* for chipaddr and flashctx */
|
||||||
|
|
||||||
|
/* flashrom.c */
|
||||||
|
int probe_dummy(struct flashctx *flash);
|
||||||
|
|
||||||
/* spi.c */
|
/* spi.c */
|
||||||
int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
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);
|
int spi_chip_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
||||||
|
12
flashrom.c
12
flashrom.c
@@ -405,6 +405,18 @@ const struct programmer_entry programmer_table[] = {
|
|||||||
{0}, /* This entry corresponds to PROGRAMMER_INVALID. */
|
{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
|
#define SHUTDOWN_MAXFN 32
|
||||||
static int shutdown_fn_count = 0;
|
static int shutdown_fn_count = 0;
|
||||||
struct shutdown_func_data {
|
struct shutdown_func_data {
|
||||||
|
Reference in New Issue
Block a user