From: Matthieu CASTET Date: Tue, 6 Nov 2012 10:51:43 +0000 (+0100) Subject: mtd: nand: onfi need to be probed in 8 bits mode X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=ff3206b2450499203532af2505a7f6f8413e92c0;p=deliverable%2Flinux.git mtd: nand: onfi need to be probed in 8 bits mode - NAND_CMD_READID want an address that it is not scaled on x16 device (it is always 0x20) - NAND_CMD_PARAM want 8 bits data Signed-off-by: Matthieu CASTET Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 5851c51ac2df..0ac49ca58524 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2857,6 +2857,8 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, int i; int val; + /* ONFI need to be probed in 8 bits mode */ + WARN_ON(chip->options & NAND_BUSWIDTH_16); /* Try ONFI for unknown chip or LP */ chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' ||