[MTD] [NAND] pxa3xx_nand: added warning which tells id of detected NAND
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Fri, 29 Aug 2008 10:59:52 +0000 (12:59 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 1 Sep 2008 20:38:44 +0000 (21:38 +0100)
Minor patch to help debugging of NAND detection.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/pxa3xx_nand.c

index bc37f551edf58f0a933450f0c53305334f67e5e9..c0fa9c9edf089c1a039ded475fb13740cfa52d1f 100644 (file)
@@ -924,7 +924,7 @@ static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
                                    const struct pxa3xx_nand_platform_data *pdata)
 {
        const struct pxa3xx_nand_flash *f;
-       uint32_t id;
+       uint32_t id = -1;
        int i;
 
        for (i = 0; i<pdata->num_flash; ++i) {
@@ -956,6 +956,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;
 }