mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: barebox@lists.infradead.org
Cc: Wolfram Sang <wsa@kernel.org>
Subject: [PATCH 1/3] mtd: nand: atmel: legacy: add 'algo' to use
Date: Sun, 19 Mar 2023 16:49:07 +0100	[thread overview]
Message-ID: <20230319154909.24047-2-wsa@kernel.org> (raw)
In-Reply-To: <20230319154909.24047-1-wsa@kernel.org>

Fixes "WARNING: Unsupported ECC algorithm!" on my USB-A9G20.

Fixes: b6bcd96de5 ("mtd: nand: Update to Linux-5.9")
Signed-off-by: Wolfram Sang <wsa@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




  reply	other threads:[~2023-03-19 15:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 15:49 [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20 Wolfram Sang
2023-03-19 15:49 ` Wolfram Sang [this message]
2023-03-19 15:49 ` [PATCH 2/3] mtd: nand: atmel: legacy: use proper ecc_shift Wolfram Sang
2023-03-19 15:49 ` [PATCH 3/3] mtd: nand: atmel: legacy: remove superfluous code Wolfram Sang
2023-03-19 18:51 ` [PATCH 0/3] mtd: nand: atmel: legacy: fix boot on USB-A9G20 Sam Ravnborg
2023-03-19 21:28   ` Wolfram Sang
2023-03-21  8:58     ` Sascha Hauer
2023-03-21  9:44       ` Alexander Dahl
2023-03-21 16:48         ` Sam Ravnborg
2023-03-21 17:20       ` Wolfram Sang
2023-03-21 19:02         ` Sam Ravnborg
2023-03-21 20:53           ` Sam Ravnborg
2023-03-21 21:42             ` Wolfram Sang
2023-03-22  7:37               ` Sascha Hauer
2023-04-27 17:25           ` Wolfram Sang
2023-04-27 17:26       ` Wolfram Sang
2023-03-22  7:41 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230319154909.24047-2-wsa@kernel.org \
    --to=wsa@kernel.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox