[PATCH 1/3] mtd: nand: atmel: legacy: add 'algo' to use
Wolfram Sang
wsa at kernel.org
Sun Mar 19 08:49:07 PDT 2023
Fixes "WARNING: Unsupported ECC algorithm!" on my USB-A9G20.
Fixes: b6bcd96de5 ("mtd: nand: Update to Linux-5.9")
Signed-off-by: Wolfram Sang <wsa at kernel.org>
---
Or maybe we should make HAMMING the default fallback in nand_base.c?
drivers/mtd/nand/atmel/legacy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/nand/atmel/legacy.c b/drivers/mtd/nand/atmel/legacy.c
index 44cd4d07e8..ea1fd64ad8 100644
--- a/drivers/mtd/nand/atmel/legacy.c
+++ b/drivers/mtd/nand/atmel/legacy.c
@@ -1246,6 +1246,10 @@ static int __init atmel_nand_probe(struct device *dev)
nand_chip->ecc.mode = NAND_ECC_HW;
}
+ if (pdata->ecc_mode == NAND_ECC_SOFT) {
+ nand_chip->ecc.algo = NAND_ECC_ALGO_HAMMING;
+ }
+
nand_chip->legacy.chip_delay = 40; /* 40us command delay time */
if (IS_ENABLED(CONFIG_NAND_ECC_BCH) &&
--
2.35.1
More information about the barebox
mailing list