By retrieving the ecc_mode from pdata we can use the same code for device tree and non device tree probing. Which was not possible before, because ecc_mode was arbitrarily set to NAND_ECC_SOFT. Signed-off-by: Raphaël Poggi <poggi.raph@xxxxxxxxx> --- drivers/mtd/nand/atmel_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 3ec6450..780d266 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -1157,7 +1157,7 @@ static int __init atmel_nand_probe(struct device_d *dev) } } - nand_chip->ecc.mode = NAND_ECC_SOFT; + nand_chip->ecc.mode = pdata->ecc_mode; if (IS_ENABLED(CONFIG_NAND_ECC_HW) && pdata->ecc_mode == NAND_ECC_HW) { -- 1.7.9.5 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox