mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 23 21:59:24 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ae211bcfa1d013bea16912e7caebb1367740d4b4
Commit:     ae211bcfa1d013bea16912e7caebb1367740d4b4
Parent:     06f384c9010ea7fa1146b9dfdd419d99c9b8a962
Author:     Rafał Miłecki <zajec5 at gmail.com>
AuthorDate: Sun Apr 17 22:53:06 2016 +0200
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Thu May 5 23:55:13 2016 +0200

    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 at gmail.com>
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/mtd/nand/nand_base.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9f96753..1d74b80 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[] = {
 	[NAND_ECC_HW]		= "hw",
 	[NAND_ECC_HW_SYNDROME]	= "hw_syndrome",
 	[NAND_ECC_HW_OOB_FIRST]	= "hw_oob_first",
-	[NAND_ECC_SOFT_BCH]	= "soft_bch",
 };
 
 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)
 		if (!strcasecmp(pm, nand_ecc_modes[i]))
 			return i;
 
+	/*
+	 * For backward compatibility we support few obsoleted values that don't
+	 * have their mappings into nand_ecc_modes_t anymore (they were merged
+	 * with other enums).
+	 */
+	if (!strcasecmp(pm, "soft_bch"))
+		return NAND_ECC_SOFT;
+
 	return -ENODEV;
 }
 



More information about the linux-mtd-cvs mailing list