[U-Boot] [PATCH 08/11] mtd: nand: honor CONFIG_SYS_NAND_QUIET_TEST with unknown NAND printk

Steve Sakoman steve at sakoman.com
Wed Sep 1 01:21:24 CEST 2010


This printk was added recently and results in ugly output on systems
with no NAND:

NAND:  nand_get_flash_type: unknown NAND device: Manufacturer ID: 0x00, Chip ID: 0x00 0 MiB

instead of:

NAND:  0 MiB

Signed-off-by: Steve Sakoman <steve at sakoman.com>
---
 drivers/mtd/nand/nand_base.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index ed1c9c9..cbcf2b8 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2653,9 +2653,11 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
 	}
 
 	if (!type) {
+#ifndef CONFIG_SYS_NAND_QUIET_TEST
 		printk(KERN_INFO "%s: unknown NAND device: Manufacturer ID:"
 		       " 0x%02x, Chip ID: 0x%02x\n", __func__,
 		       *maf_id, dev_id);
+#endif
 		return ERR_PTR(-ENODEV);
 	}
 
-- 
1.7.0.4



More information about the U-Boot mailing list