summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/mxs_nand.c4
-rw-r--r--scripts/config_whitelist.txt1
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index ef571b4098..53915ee69b 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -257,8 +257,8 @@ static int mxs_nand_get_ecc_strength(struct mtd_info *mtd)
#if defined(CONFIG_NAND_MXS_BCH_LEGACY_GEO)
ecc_strength = ((page_oob_size - MXS_NAND_METADATA_SIZE) * 8)
/(galois_field * mxs_nand_ecc_chunk_cnt(mtd->writesize));
- ecc_strength += ecc_strength & 1;
- ecc_strength = min(ecc_strength, MXS_NAND_MAX_ECC_STRENGTH);
+ ecc_strength = round_down(ecc_strength, 2);
+ ecc_strength = min(ecc_strength, max_ecc_strength_supported);
#endif
}
return 0;
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index fc6fca8bb8..51ee1f9eeb 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3307,6 +3307,7 @@ CONFIG_NAND_MPC5121_NFC
CONFIG_NAND_MXC
CONFIG_NAND_MXC_V1_1
CONFIG_NAND_MXS
+CONFIG_NAND_MXS_BCH_LEGACY_GEO
CONFIG_NAND_NDFC
CONFIG_NAND_OMAP_ECCSCHEME
CONFIG_NAND_OMAP_ELM