public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] NAND: show manufacturer and device ID for unknown chips
@ 2010-06-23 21:53 Scott Wood
  2010-06-24  9:56 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Wood @ 2010-06-23 21:53 UTC (permalink / raw)
  To: u-boot

From: Florian Fainelli <florian@openwrt.org>

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>
---
Whitespace amended to be consistent with rest of file.

Applied to u-boot-nand-flash next.

 drivers/mtd/nand/nand_base.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 7171bdd..ed1c9c9 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -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;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-24  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-23 21:53 [U-Boot] [PATCH v2] NAND: show manufacturer and device ID for unknown chips Scott Wood
2010-06-24  9:56 ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox