projects
/
fw
/
openocd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acdf14e
)
Improve NAND flash detection
author
Damjan Marion
<damjan.marion@gmail.com>
Mon, 23 May 2011 11:25:28 +0000
(13:25 +0200)
committer
Øyvind Harboe
<oyvind.harboe@zylin.com>
Sat, 28 May 2011 12:30:58 +0000
(14:30 +0200)
Detect based on both manufacturer id and chip id
if manufacturer id is defined in table
src/flash/nand/core.c
patch
|
blob
|
history
diff --git
a/src/flash/nand/core.c
b/src/flash/nand/core.c
index a9fc3cdaac96d67f4d678831da59c2cdfb4e0211..c4d92482152256612decccceaad0e950e1de0b07 100644
(file)
--- 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;