Commit 53575aa5 authored by Roger Quadros's avatar Roger Quadros Committed by Greg Kroah-Hartman

mtd: nand: omap: Fix NAND enumeration on 3430 LDP

commit 775a9134 upstream.

3430LDP has NAND flash with 32 bytes OOB size which is sufficient to hold
BCH8 codes but the small page check introduced in
commit b491da72 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")
considers anything below 64 bytes unsuitable for BCH4/8/16. There is another
bug in that code where it doesn't skip the check for OMAP_ECC_HAM1_CODE_SW.

Get rid of that small page check code as it is insufficient and redundant
because we are checking for OOB available bytes vs ecc layout before calling
nand_scan_tail().

Fixes: b491da72 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")
Reported-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d019b469
...@@ -1741,13 +1741,6 @@ static int omap_nand_probe(struct platform_device *pdev) ...@@ -1741,13 +1741,6 @@ static int omap_nand_probe(struct platform_device *pdev)
goto return_error; goto return_error;
} }
/* check for small page devices */
if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) {
dev_err(&info->pdev->dev, "small page devices are not supported\n");
err = -EINVAL;
goto return_error;
}
/* re-populate low-level callbacks based on xfer modes */ /* re-populate low-level callbacks based on xfer modes */
switch (pdata->xfer_type) { switch (pdata->xfer_type) {
case NAND_OMAP_PREFETCH_POLLED: case NAND_OMAP_PREFETCH_POLLED:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment