From: Wolfram Sang <wsa@kernel.org>
To: barebox@lists.infradead.org
Cc: Wolfram Sang <wsa@kernel.org>
Subject: [PATCH 3/3] mtd: nand: atmel: legacy: remove superfluous code
Date: Sun, 19 Mar 2023 16:49:09 +0100 [thread overview]
Message-ID: <20230319154909.24047-4-wsa@kernel.org> (raw)
In-Reply-To: <20230319154909.24047-1-wsa@kernel.org>
54bccadddd always populates 'ecc_mode' but forgot to remove the
code which overwrote the previously hardcoded 'NAND_ECC_SOFT'
when needed. This is obsolete now.
Fixes: 54bccadddd ("mtd: atmel_nand: retrieve ecc_mode from pdata")
Signed-off-by: Wolfram Sang <wsa@kernel.org>
---
drivers/mtd/nand/atmel/legacy.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/mtd/nand/atmel/legacy.c b/drivers/mtd/nand/atmel/legacy.c
index 184cf465e3..cf402549b8 100644
--- a/drivers/mtd/nand/atmel/legacy.c
+++ b/drivers/mtd/nand/atmel/legacy.c
@@ -1242,21 +1242,12 @@ static int __init atmel_nand_probe(struct device *dev)
nand_chip->ecc.strength = pdata->ecc_strength ? : 1;
nand_chip->ecc.size = 1 << (pdata->ecc_size_shift ? : 9);
- if (pdata->ecc_mode == NAND_ECC_HW) {
- 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) &&
- pdata->ecc_mode == NAND_ECC_SOFT_BCH) {
- nand_chip->ecc.mode = NAND_ECC_SOFT_BCH;
- }
-
if (host->board->bus_width_16) { /* 16-bit bus width */
nand_chip->options |= NAND_BUSWIDTH_16;
nand_chip->legacy.read_buf = atmel_read_buf16;
--
2.35.1
next prev parent 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 ` [PATCH 1/3] mtd: nand: atmel: legacy: add 'algo' to use Wolfram Sang
2023-03-19 15:49 ` [PATCH 2/3] mtd: nand: atmel: legacy: use proper ecc_shift Wolfram Sang
2023-03-19 15:49 ` Wolfram Sang [this message]
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-4-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