summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDario Binacchi <dario.binacchi@amarulasolutions.com>2023-04-22 22:58:10 +0200
committerDario Binacchi <dario.binacchi@amarulasolutions.com>2023-04-22 23:04:55 +0200
commitfee6b9b734950edf33128cbd76142bdf3d29637f (patch)
treea557dd8a95d244b818324303585df3af73d4bc2d /drivers/mtd
parent5db4972a5bbdbf9e3af48ffc9bc4fec73b7b6a79 (diff)
downloadu-boot-fee6b9b734950edf33128cbd76142bdf3d29637f.tar.gz
u-boot-fee6b9b734950edf33128cbd76142bdf3d29637f.tar.bz2
u-boot-fee6b9b734950edf33128cbd76142bdf3d29637f.zip
Revert "mtd: rawnand: nand_base: Handle algorithm selection"
It will be replaced by a more recent version which contains fixes for tests run by Tom Rini. This reverts commit ff33d3c87c2a1ab576607c2f67a9cb7690a4e7ca. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/raw/nand_base.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index c173fd0923..9eba360d55 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -4487,7 +4487,6 @@ EXPORT_SYMBOL(nand_detect);
static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode node)
{
int ret, ecc_mode = -1, ecc_strength, ecc_step;
- int ecc_algo = NAND_ECC_UNKNOWN;
const char *str;
ret = ofnode_read_s32_default(node, "nand-bus-width", -1);
@@ -4513,13 +4512,10 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod
ecc_mode = NAND_ECC_SOFT_BCH;
}
- str = ofnode_read_string(node, "nand-ecc-algo");
- if (str && !strcmp(str, "bch")) {
- ecc_algo = NAND_ECC_BCH;
- if (ecc_mode == NAND_ECC_SOFT)
+ if (ecc_mode == NAND_ECC_SOFT) {
+ str = ofnode_read_string(node, "nand-ecc-algo");
+ if (str && !strcmp(str, "bch"))
ecc_mode = NAND_ECC_SOFT_BCH;
- } else if (!strcmp(str, "hamming")) {
- ecc_algo = NAND_ECC_HAMMING;
}
ecc_strength = ofnode_read_s32_default(node,
@@ -4533,8 +4529,6 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod
return -EINVAL;
}
- chip->ecc.algo = ecc_algo;
-
if (ecc_mode >= 0)
chip->ecc.mode = ecc_mode;