MLK-10245: mtd: nand: may use minimum required ecc for 744 oobsize NAND
By default, NAND driver will choose the highest ecc strength that oob
could contain, in this case, for some 8K+744 NAND flash, the ecc
strength will be up to 52bit, which is beyond the i.MX6QDL BCH
capability (40bit).
This code change allows the NAND driver try to use minimum required ecc
strength if it failed to use the highest ecc, even without explicitly
claiming "fsl,use-minimum-ecc" in dts.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit
aba987c75fcf264d60f4f819dda53fcb828f7c73)