diff options
author | Justin Waters <justin.waters@timesys.com> | 2008-06-16 13:56:34 -0400 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2008-06-16 13:57:51 -0400 |
commit | 72e20f5704987c27e549c85706b125fd4bac02c7 (patch) | |
tree | c5a252708f5a4f6e04cd9390c5bd29b8bd48fda4 /drivers | |
parent | 405bb978ee2321b6cf5381a012c812bdc7679e40 (diff) | |
parent | 251484cfb845d5d54c652a1801270ede1521ca6d (diff) |
Merge branch 'u-boot-1.1.5-at91' into u-boot-1.3.0-at91
Conflicts:
include/configs/at91sam9261ek.h
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nand/nand_base.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c index 3a8b96c23c2..72df3879d47 100644 --- a/drivers/nand/nand_base.c +++ b/drivers/nand/nand_base.c @@ -2355,18 +2355,21 @@ int nand_scan (struct mtd_info *mtd, int maxchips) busw = nand_flash_ids[i].options & NAND_BUSWIDTH_16; } + /* Try to identify manufacturer */ + for (j = 0; nand_manuf_ids[j].id != 0x0; j++) { + if (nand_manuf_ids[j].id == nand_maf_id) + break; + } + /* Check, if buswidth is correct. Hardware drivers should set * this correct ! */ - printk (KERN_INFO "NAND device: Manufacturer ID:" - " 0x%02x, Chip ID: 0x%02x (%s %s)\n", nand_maf_id, nand_dev_id, - nand_manuf_ids[i].name , mtd->name); - printk(KERN_INFO "NAND: Pagesize: %u, Blocksize: %uK, OOBsize: %u\n", - mtd->oobblock, mtd->erasesize/1024, mtd->oobsize); - if (busw != (this->options & NAND_BUSWIDTH_16)) { -/* printk (KERN_WARNING */ -/* "NAND bus width %d instead %d bit\n", */ -/* (this->options & NAND_BUSWIDTH_16) ? 16 : 8, */ -/* busw ? 16 : 8); */ + if (busw == (this->options & NAND_BUSWIDTH_16)) { + printk (KERN_INFO "NAND device: Manufacturer ID:" + " 0x%02x, Chip ID: 0x%02x (%s %s)\n", nand_maf_id, nand_dev_id, + nand_manuf_ids[j].name , mtd->name); + printk(KERN_INFO "NAND: Pagesize: %u, Blocksize: %uK, OOBsize: %u\n", + mtd->oobblock, mtd->erasesize/1024, mtd->oobsize); + } else { this->select_chip(mtd, -1); return 1; } |