[PATCH 6/6] pxa3xx_nand: added warning which tells id of detected NAND

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Fri Aug 29 06:59:52 EDT 2008


Minor patch to help debugging of NAND detection.

Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
---
 drivers/mtd/nand/pxa3xx_nand.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 45bb2ca..3fe9cd7 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -901,7 +901,7 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
 				    struct pxa3xx_nand_platform_data const *pdata)
 {
 	struct pxa3xx_nand_flash const *f;
-	uint32_t id;
+	uint32_t id = -1;
 	int i;
 
 	for (i = 0; i<pdata->num_flash; ++i) {
@@ -933,6 +933,9 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
 	}
 #endif
 
+	dev_warn(&info->pdev->dev,
+		 "failed to detect configured nand flash; found %04x instead of\n",
+		 id);
 	return -ENODEV;
 }
 
-- 
1.5.5.1




More information about the linux-mtd mailing list