Browse Source

Improve NAND flash detection

Detect based on both manufacturer id and chip id
if manufacturer id is defined in table
tags/v0.5.0-rc1
Damjan Marion 13 years ago
committed by Øyvind Harboe
parent
commit
db91a36fdd
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/flash/nand/core.c

+ 3
- 1
src/flash/nand/core.c View 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;


Loading…
Cancel
Save