summaryrefslogtreecommitdiff
path: root/drivers/nand/nand_base.c
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2008-06-16 13:31:33 -0400
committerJustin Waters <justin.waters@timesys.com>2008-06-16 13:31:33 -0400
commit251484cfb845d5d54c652a1801270ede1521ca6d (patch)
treed89611f0f7d9f1cd468c53d2cb122041db75b74a /drivers/nand/nand_base.c
parentfc0717dc30824a3e0b9115c44787af7483e5aaa7 (diff)
Update to Atmel's 1.7 patch for 1.1.51.1.5-at91-200806161731
This patch came from Atmel. It fixes a number of NAND issues, as well as the 9263 rev B SPI bug. Signed-off-by: Justin Waters <justin.waters@timesys.com>
Diffstat (limited to 'drivers/nand/nand_base.c')
-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 c531ef8e79..193aa8a907 100644
--- a/drivers/nand/nand_base.c
+++ b/drivers/nand/nand_base.c
@@ -2354,18 +2354,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;
}