diff options
author | Matthieu CASTET <matthieu.castet@parrot.com> | 2012-11-06 05:51:43 -0500 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-12-03 09:36:52 -0500 |
commit | ff3206b2450499203532af2505a7f6f8413e92c0 (patch) | |
tree | 36b2d24c954bd7901c0d46a1c84b135f20d29ddc | |
parent | 64b37b2a63eb2f80b65c7185f0013f8ffc637ae3 (diff) |
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 <matthieu.castet@parrot.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | 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 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, | |||
2857 | int i; | 2857 | int i; |
2858 | int val; | 2858 | int val; |
2859 | 2859 | ||
2860 | /* ONFI need to be probed in 8 bits mode */ | ||
2861 | WARN_ON(chip->options & NAND_BUSWIDTH_16); | ||
2860 | /* Try ONFI for unknown chip or LP */ | 2862 | /* Try ONFI for unknown chip or LP */ |
2861 | chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); | 2863 | chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); |
2862 | if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || | 2864 | if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' || |