When no requirement in Device Tree is given about the ECC strength and
step size, the engine should fallback on the minimal working case for
this engine (16b/1024B) instead of the NAND chip requirement which might
be simply unreachable.

Signed-off-by: Miquel Raynal <miquel.ray...@free-electrons.com>
---
 drivers/mtd/nand/sunxi_nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index 8bc3828854..e8e7ad8ac5 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1417,6 +1417,7 @@ static int sunxi_nand_hw_common_ecc_ctrl_init(struct 
mtd_info *mtd,
                goto err;
        }
 
+       ecc->strength = strengths[i];
        data->mode = i;
 
        /* HW ECC always request ECC bytes for 1024 bytes blocks */
-- 
2.11.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to