mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 11:24:42 +00:00
mtd: nand: raw: Add support for DT property nand-ecc-algo=bch
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>
This commit is contained in:
parent
c9ea9019c5
commit
06ef911447
1 changed files with 6 additions and 0 deletions
|
@ -4598,6 +4598,12 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod
|
||||||
ecc_mode = NAND_ECC_SOFT_BCH;
|
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,
|
ecc_strength = ofnode_read_s32_default(node,
|
||||||
"nand-ecc-strength", -1);
|
"nand-ecc-strength", -1);
|
||||||
ecc_step = ofnode_read_s32_default(node,
|
ecc_step = ofnode_read_s32_default(node,
|
||||||
|
|
Loading…
Add table
Reference in a new issue