[flashrom] [PATCH] spi25: ignore 0x00 as a manufacturer id in the generic match

Urja Rannikko urjaman at gmail.com
Sun Mar 8 08:23:00 CET 2015


Saying that manufacturer id 0x00 is an "unknown SPI chip"
just confuses people with external programmers without a
proper connection to a chip and makes them think flashrom
doesnt support the chip they're trying to use.
Also causes unnecessary -c requirement with a multiple-slot
(FWH/LPC and SPI) serprog device i was testing.

Signed-off-by: Urja Rannikko <urjaman at gmail.com>
---
 spi25.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spi25.c b/spi25.c
index 673bdf5..af4b6db 100644
--- a/spi25.c
+++ b/spi25.c
@@ -156,7 +156,7 @@ static int probe_spi_rdid_generic(struct flashctx *flash, int bytes)
 		return 1;
 
 	/* Test if there is any vendor ID. */
-	if (GENERIC_MANUF_ID == chip->manufacture_id && id1 != 0xff)
+	if (GENERIC_MANUF_ID == chip->manufacture_id && id1 != 0xff && id1 != 0x00)
 		return 1;
 
 	return 0;
@@ -212,7 +212,7 @@ int probe_spi_rems(struct flashctx *flash)
 		return 1;
 
 	/* Test if there is any vendor ID. */
-	if (GENERIC_MANUF_ID == chip->manufacture_id && id1 != 0xff)
+	if (GENERIC_MANUF_ID == chip->manufacture_id && id1 != 0xff && id1 != 0x00)
 		return 1;
 
 	return 0;
-- 
2.3.1





More information about the flashrom mailing list