]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: rawnand: add Reed-Solomon error correction algorithm
authorStefan Agner <stefan@agner.ch>
Sun, 24 Jun 2018 21:27:22 +0000 (23:27 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 2 Jul 2018 07:01:41 +0000 (09:01 +0200)
Add Reed-Solomon (RS) to the enumeration of ECC algorithms.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Documentation/devicetree/bindings/mtd/nand.txt
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/rawnand.h

index 8bb11d809429d7a28713da8523e1c15c09494ff7..eaef8c657aa5cf7c2fbcfac325c017078984e11a 100644 (file)
@@ -25,7 +25,7 @@ Optional NAND chip properties:
                  Deprecated values:
                  "soft_bch": use "soft" and nand-ecc-algo instead
 - nand-ecc-algo: string, algorithm of NAND ECC.
-                Supported values are: "hamming", "bch".
+                Valid values are: "hamming", "bch", "rs".
 - nand-bus-width : 8 or 16 bus width if not present 8
 - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
 
index b01d15ec4c56bfbdded578526d76e2ed12b65093..d0af5347f89dc6cc06f8bf5e28ebaf6723341ebc 100644 (file)
@@ -5777,6 +5777,7 @@ static int of_get_nand_ecc_mode(struct device_node *np)
 static const char * const nand_ecc_algos[] = {
        [NAND_ECC_HAMMING]      = "hamming",
        [NAND_ECC_BCH]          = "bch",
+       [NAND_ECC_RS]           = "rs",
 };
 
 static int of_get_nand_ecc_algo(struct device_node *np)
index 3e8ec3b8a39c7ce39ac563ad157d3f9563c24d86..2d9cb7acbc3d88c19b0041a5dad04702274f40e5 100644 (file)
@@ -121,6 +121,7 @@ enum nand_ecc_algo {
        NAND_ECC_UNKNOWN,
        NAND_ECC_HAMMING,
        NAND_ECC_BCH,
+       NAND_ECC_RS,
 };
 
 /*