[PATCH] Find correct manufacture ID

Kyungmin Park kyungmin.park at samsung.com
Wed Feb 16 04:10:58 EST 2005


	If you find 8-bit buswidth flash with 16-bit buswidth option, it
displays warning message.
	Before display you have to find correct manufacture ID.
 Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>

diff -u -r1.1.1.1 nand_base.c
--- drivers/mtd/nand/nand_base.c        13 Jan 2005 06:51:14 -0000      1.1.
1.1
+++ drivers/mtd/nand/nand_base.c        16 Feb 2005 08:19:48 -0000
@@ -2259,9 +2259,15 @@
                /* Check, if buswidth is correct. Hardware drivers should
set
                 * this correct ! */
                if (busw != (this->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;
+                       }
                        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);
+                               nand_manuf_ids[j].name , mtd->name);
                        printk (KERN_WARNING
                                "NAND bus width %d instead %d bit\n",
                                        (this->options & NAND_BUSWIDTH_16)
? 16 : 8,





More information about the linux-mtd mailing list