summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2008-06-16 13:56:34 -0400
committerJustin Waters <justin.waters@timesys.com>2008-06-16 13:57:51 -0400
commit72e20f5704987c27e549c85706b125fd4bac02c7 (patch)
treec5a252708f5a4f6e04cd9390c5bd29b8bd48fda4 /drivers
parent405bb978ee2321b6cf5381a012c812bdc7679e40 (diff)
parent251484cfb845d5d54c652a1801270ede1521ca6d (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.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c
index 3a8b96c23c..72df3879d4 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;
}