diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-04-17 16:53:06 -0400 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-05-05 17:55:13 -0400 |
commit | ae211bcfa1d013bea16912e7caebb1367740d4b4 (patch) | |
tree | 70b1e9a53102f7b1210b1dbe3a1a282b2c4a881c | |
parent | 06f384c9010ea7fa1146b9dfdd419d99c9b8a962 (diff) |
mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
There isn't any difference between handling NAND_ECC_SOFT and
NAND_ECC_SOFT_BCH now. What matters is the new field called "algo".
Please note we're keeping backward DT compatibility. We are still
treating "soft_bch" value as the one setting Hamming algorithm, it's
just handled in of_get_nand_ecc_algo now.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 9f967531bc68..1d74b802aa0a 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -3977,7 +3977,6 @@ static const char * const nand_ecc_modes[] = { | |||
3977 | [NAND_ECC_HW] = "hw", | 3977 | [NAND_ECC_HW] = "hw", |
3978 | [NAND_ECC_HW_SYNDROME] = "hw_syndrome", | 3978 | [NAND_ECC_HW_SYNDROME] = "hw_syndrome", |
3979 | [NAND_ECC_HW_OOB_FIRST] = "hw_oob_first", | 3979 | [NAND_ECC_HW_OOB_FIRST] = "hw_oob_first", |
3980 | [NAND_ECC_SOFT_BCH] = "soft_bch", | ||
3981 | }; | 3980 | }; |
3982 | 3981 | ||
3983 | static int of_get_nand_ecc_mode(struct device_node *np) | 3982 | static int of_get_nand_ecc_mode(struct device_node *np) |
@@ -3993,6 +3992,14 @@ static int of_get_nand_ecc_mode(struct device_node *np) | |||
3993 | if (!strcasecmp(pm, nand_ecc_modes[i])) | 3992 | if (!strcasecmp(pm, nand_ecc_modes[i])) |
3994 | return i; | 3993 | return i; |
3995 | 3994 | ||
3995 | /* | ||
3996 | * For backward compatibility we support few obsoleted values that don't | ||
3997 | * have their mappings into nand_ecc_modes_t anymore (they were merged | ||
3998 | * with other enums). | ||
3999 | */ | ||
4000 | if (!strcasecmp(pm, "soft_bch")) | ||
4001 | return NAND_ECC_SOFT; | ||
4002 | |||
3996 | return -ENODEV; | 4003 | return -ENODEV; |
3997 | } | 4004 | } |
3998 | 4005 | ||