]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
NAND: show manufacturer and device ID for unknown chips
authorFlorian Fainelli <florian@openwrt.org>
Sat, 12 Jun 2010 18:59:25 +0000 (20:59 +0200)
committerScott Wood <scottwood@freescale.com>
Thu, 8 Jul 2010 21:49:50 +0000 (16:49 -0500)
When the NAND part is not supported, it is useful to show the manufacturer
and device ID to help debugging and reporting.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
drivers/mtd/nand/nand_base.c

index 7171bdd51b421441f401df6b70cb1b56bfdea3f1..ed1c9c9a88aa906b70dbd83698f7406e010dd774 100644 (file)
@@ -2652,8 +2652,12 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
                }
        }
 
-       if (!type)
+       if (!type) {
+               printk(KERN_INFO "%s: unknown NAND device: Manufacturer ID:"
+                      " 0x%02x, Chip ID: 0x%02x\n", __func__,
+                      *maf_id, dev_id);
                return ERR_PTR(-ENODEV);
+       }
 
        if (!mtd->name)
                mtd->name = type->name;