aboutsummaryrefslogtreecommitdiff
path: root/util/flashrom/spi.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-01-04 16:22:09 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-01-04 16:22:09 +0000
commitb5f9bd6ac974003df255358ef89d8bcb2b496789 (patch)
tree1f7130fa75659fbf10a6f84e35a3635a6b4dd8ca /util/flashrom/spi.c
parent717f66d1ebc4e6ae6e590ec081ae7a8ba698b37f (diff)
Print at least the vendor for SPI flash chips if the exact chip ID is
unknown. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3032 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/spi.c')
-rw-r--r--util/flashrom/spi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/util/flashrom/spi.c b/util/flashrom/spi.c
index 5f9290a536..1040b01e06 100644
--- a/util/flashrom/spi.c
+++ b/util/flashrom/spi.c
@@ -262,14 +262,19 @@ int probe_spi(struct flashchip *flash)
manuf_id = readarr[0];
model_id = (readarr[1] << 8) | readarr[2];
printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, manuf_id, model_id);
- if (manuf_id == flash->manufacture_id && model_id == flash->model_id) {
- /* Print the status register before erase to tell the
+ if (manuf_id == flash->manufacture_id &&
+ model_id == flash->model_id) {
+ /* Print the status register to tell the
* user about possible write protection.
*/
generic_spi_prettyprint_status_register(flash);
return 1;
}
+ /* Test if this is a pure vendor match. */
+ if (manuf_id == flash->manufacture_id &&
+ GENERIC_DEVICE_ID == flash->model_id)
+ return 1;
}
return 0;