From aedc04631a248216b3b0e081df0e586428c28cbe Mon Sep 17 00:00:00 2001 From: hailfinger Date: Fri, 20 Nov 2009 01:12:45 +0000 Subject: If a chip is not on the RDID generic vendor list nor on the REMS specific ID list, flashrom will claim that no chip is there. Handle these cases gracefully. flashrom will ignore generic matches if a specific chip was found, so this will have no impact on supported chips, but help a lot for a first quick analysis by the user or developer. The only drawback is that unknown chips may be recognized multiple times until they are added to flashchips.[ch]. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Marc Jones git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@767 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- spi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spi.c') diff --git a/spi.c b/spi.c index 48be29a..29c202c 100644 --- a/spi.c +++ b/spi.c @@ -281,6 +281,11 @@ static int probe_spi_rdid_generic(struct flashchip *flash, int bytes) GENERIC_DEVICE_ID == flash->model_id) return 1; + /* Test if there is any vendor ID. */ + if (GENERIC_MANUF_ID == flash->manufacture_id && + id1 != 0xff) + return 1; + return 0; } @@ -340,6 +345,11 @@ int probe_spi_rems(struct flashchip *flash) GENERIC_DEVICE_ID == flash->model_id) return 1; + /* Test if there is any vendor ID. */ + if (GENERIC_MANUF_ID == flash->manufacture_id && + id1 != 0xff) + return 1; + return 0; } -- cgit v1.2.1