summaryrefslogtreecommitdiffstats
path: root/spi.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-11-20 01:12:45 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-11-20 01:12:45 +0000
commit31b3779d971b66d52eb4d54e19a53c3f53ef5653 (patch)
treebf814fbd7d2cccd943299f00e2ef5277b16e36ae /spi.c
parent462c33f7231a52fd7d6e821f54bfec2401965d64 (diff)
downloadflashrom-31b3779d971b66d52eb4d54e19a53c3f53ef5653.zip
flashrom-31b3779d971b66d52eb4d54e19a53c3f53ef5653.tar.gz
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]. Corresponding to flashrom svn r767. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'spi.c')
-rw-r--r--spi.c10
1 files changed, 10 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud