mtd: gpmi: fix the bch setting backward compatible issue
authorHan Xu <han.xu@nxp.com>
Fri, 25 Mar 2022 13:36:38 +0000 (08:36 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 28 Mar 2022 12:22:17 +0000 (08:22 -0400)
commited48490f8d3f8715b23071a8a1cbe5bba8c8626e
treed3d5947e5c1e76e0295e1c6e854ae9b35aaeac71
parent408e2d5a224d8c62beae4cb1e7a3804abbbb123f
mtd: gpmi: fix the bch setting backward compatible issue

Previous u-boot code changed the default bch setting behavior and caused
backward compatible issue. This fix choose the legacy bch geometry back
again as the default option. If the minimum ecc strength that NAND chips
required need to be chosen, it can be enabled by either adding DT flag
"fsl,use-minimum-ecc" or CONFIG_NAND_MXS_USE_MINIMUM_ECC in configs. The
unused flag "fsl,legacy-bch-geometry" get removed.

Fixes: 51cdf83eea (mtd: gpmi: provide the option to use legacy bch geometry)
Fixes: 616f03daba (mtd: gpmi: change the BCH layout setting for large oob NAND)
Tested-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/mxs_nand.c
drivers/mtd/nand/raw/mxs_nand_dt.c
include/mxs_nand.h