mtd: nand: onfi need to be probed in 8 bits mode
authorMatthieu CASTET <matthieu.castet@parrot.com>
Tue, 6 Nov 2012 10:51:43 +0000 (11:51 +0100)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 3 Dec 2012 14:36:52 +0000 (16:36 +0200)
- 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>
drivers/mtd/nand/nand_base.c

index 5851c51ac2dfbdb32bf9d132f55b1e268b66a324..0ac49ca585243f42f671fc793e2498210efd5e38 100644 (file)
@@ -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' ||
This page took 0.02601 seconds and 5 git commands to generate.