aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu CASTET <matthieu.castet@parrot.com>2013-01-16 09:25:45 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-01-19 04:58:33 -0500
commit0ce82b7f7b7373b16ecf7b5725e21e2975204500 (patch)
treee317b49de38c81bc256cbb16a7ea936b971a8766
parent7dfe4be351e81656ca1068e5d4ead235c7ba94b1 (diff)
mtd: nand: onfi don't WARN if we are in 16 bits mode
Commit ff3206b2450499203532af2505a7f6f8413e92c0 ('mtd: nand: onfi need to be probed in 8 bits mode') adds a WARN if the onfi probe is in 16 bits mode. This allows to detect driver that need to be fixed, but this is a bit noisy¹. Transform the WARN in a pr_err. ¹ http://article.gmane.org/gmane.linux.ports.arm.omap/91317 Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/nand/nand_base.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 8323ac991ad1..3766682a0289 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2857,8 +2857,11 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
2857 int i; 2857 int i;
2858 int val; 2858 int val;
2859 2859
2860 /* ONFI need to be probed in 8 bits mode */ 2860 /* ONFI need to be probed in 8 bits mode, and 16 bits should be selected with NAND_BUSWIDTH_AUTO */
2861 WARN_ON(chip->options & NAND_BUSWIDTH_16); 2861 if (chip->options & NAND_BUSWIDTH_16) {
2862 pr_err("Trying ONFI probe in 16 bits mode, aborting !\n");
2863 return 0;
2864 }
2862 /* Try ONFI for unknown chip or LP */ 2865 /* Try ONFI for unknown chip or LP */
2863 chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); 2866 chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1);
2864 if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || 2867 if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' ||