Detect based on both manufacturer id and chip id
if manufacturer id is defined in table
---
 src/flash/nand/core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/flash/nand/core.c b/src/flash/nand/core.c
index 4ab9436..03deabd 100644
--- a/src/flash/nand/core.c
+++ b/src/flash/nand/core.c
@@ -367,7 +367,9 @@ int nand_probe(struct nand_device *nand)
 
        for (i = 0; nand_flash_ids[i].name; i++)
        {
-               if (nand_flash_ids[i].id == device_id)
+               if (nand_flash_ids[i].id == device_id &&
+                  (nand_flash_ids[i].mfr_id == manufacturer_id ||
+                   nand_flash_ids[i].mfr_id == 0 ))
                {
                        nand->device = &nand_flash_ids[i];
                        break;
-- 
1.7.3.4

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to