]> git.sur5r.net Git - openocd/blobdiff - src/flash/nand/core.c
Improve NAND flash detection
[openocd] / src / flash / nand / core.c
index a9fc3cdaac96d67f4d678831da59c2cdfb4e0211..c4d92482152256612decccceaad0e950e1de0b07 100644 (file)
@@ -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;