From: Damjan Marion Date: Mon, 23 May 2011 11:25:28 +0000 (+0200) Subject: Improve NAND flash detection X-Git-Tag: v0.5.0-rc1~53 X-Git-Url: https://git.sur5r.net/?p=openocd;a=commitdiff_plain;h=db91a36fdd888f57f16bd86cd471764565810371 Improve NAND flash detection Detect based on both manufacturer id and chip id if manufacturer id is defined in table --- diff --git a/src/flash/nand/core.c b/src/flash/nand/core.c index a9fc3cda..c4d92482 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;