Commit 772af34b1216acc8e6a1a3faf43fef7c90b26a2f
Committed by
Peng Fan
1 parent
67c19ad1a2
Exists in
smarc-rel_imx_4.1.15_2.0.0_ga
MLK-12603: mtd: gpmi: may use legacy bch geometry in u-boot
provide one config "CONFIG_NAND_MXS_BCH_LEGACY_GEO" to keep using legacy bch geometry. NOTICE: the feature must be enabled/disabled in both u-boot and kernel. Signed-off-by: Han Xu <han.xu@nxp.com> (cherry picked from commit 0abc9c182c24f88522bd74fa1b53cd2fa3477184)
Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff
drivers/mtd/nand/mxs_nand.c
... | ... | @@ -249,6 +249,12 @@ |
249 | 249 | } else { |
250 | 250 | ecc_strength = chip->ecc_strength_ds; |
251 | 251 | ecc_strength += ecc_strength & 1; |
252 | +#if defined(CONFIG_NAND_MXS_BCH_LEGACY_GEO) | |
253 | + ecc_strength = ((page_oob_size - MXS_NAND_METADATA_SIZE) * 8) | |
254 | + /(galois_field * mxs_nand_ecc_chunk_cnt(mtd->writesize)); | |
255 | + ecc_strength += ecc_strength & 1; | |
256 | + ecc_strength = min(ecc_strength, MXS_NAND_MAX_ECC_STRENGTH); | |
257 | +#endif | |
252 | 258 | } |
253 | 259 | return 0; |
254 | 260 | }; |
-
mentioned in commit 58794b
-
mentioned in commit 58794b
-
mentioned in commit 58794b
-
mentioned in commit 58794b
-
mentioned in commit 58794b
-
mentioned in commit 58794b
-
mentioned in commit 7110e7
-
mentioned in commit 7110e7
-
mentioned in commit 7110e7
-
mentioned in commit 7110e7
-
mentioned in commit 7110e7
-
mentioned in commit 7110e7