According to Linux kernel DT schema nand-controller.yaml, using DT property
nand-ecc-algo=bch is the correct way for specifying BCH as ECC algorithm.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
ecc_mode = NAND_ECC_SOFT_BCH;
}
+ if (ecc_mode == NAND_ECC_SOFT) {
+ str = ofnode_read_string(node, "nand-ecc-algo");
+ if (str && !strcmp(str, "bch"))
+ ecc_mode = NAND_ECC_SOFT_BCH;
+ }
+
ecc_strength = ofnode_read_s32_default(node,
"nand-ecc-strength", -1);
ecc_step = ofnode_read_s32_default(node,