Because the device bus can be 8-bit or 16-bit width, yet ONFI detection cannot work in 16-bit mode, we need to set the NAND_BUSWIDTH_AUTO option which allows proper initialization configuration. Once the bus width is detected, nand_scan_ident() updates the nand_chip struct 'option' field to use the appropriate read/write functions and configure the ECC engine. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@xxxxxxxxxxxxxxxxxx> --- drivers/mtd/nand/omap2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index ec40b8d..c71206b 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1662,7 +1662,7 @@ static int omap_nand_probe(struct platform_device *pdev) mtd->owner = THIS_MODULE; nand_chip = &info->nand; nand_chip->ecc.priv = NULL; - nand_chip->options |= NAND_SKIP_BBTSCAN; + nand_chip->options |= NAND_SKIP_BBTSCAN | NAND_BUSWIDTH_AUTO; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) { @@ -1708,7 +1708,6 @@ static int omap_nand_probe(struct platform_device *pdev) } /* scan NAND device connected to chip controller */ - nand_chip->options |= pdata->devsize & NAND_BUSWIDTH_16; if (nand_scan_ident(mtd, 1, NULL)) { pr_err("nand device scan failed, may be bus-width mismatch\n"); err = -ENXIO; -- 1.8.1.5 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html