From e973b05710de68556dd5b7f336816b03d2b0e691 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Fri, 4 Jan 2008 16:22:09 +0000 Subject: Print at least the vendor for SPI flash chips if the exact chip ID is unknown Corresponding to flashrom svn r173 and coreboot v2 svn r3032. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Ronald G. Minnich --- spi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'spi.c') diff --git a/spi.c b/spi.c index 5f9290a5..1040b01e 100644 --- a/spi.c +++ b/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; -- cgit v1.2.3