Skip to content

Commit f308d73

Browse files
agnersmiquelraynal
authored andcommitted
mtd: rawnand: add Reed-Solomon error correction algorithm
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>
1 parent 16c4fba commit f308d73

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎Documentation/devicetree/bindings/mtd/nand.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Optional NAND chip properties:
2525
Deprecated values:
2626
"soft_bch": use "soft" and nand-ecc-algo instead
2727
- nand-ecc-algo: string, algorithm of NAND ECC.
28-
Supported values are: "hamming", "bch".
28+
Valid values are: "hamming", "bch", "rs".
2929
- nand-bus-width : 8 or 16 bus width if not present 8
3030
- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
3131

‎drivers/mtd/nand/raw/nand_base.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5777,6 +5777,7 @@ static int of_get_nand_ecc_mode(struct device_node *np)
57775777
static const char * const nand_ecc_algos[] = {
57785778
[NAND_ECC_HAMMING] = "hamming",
57795779
[NAND_ECC_BCH] = "bch",
5780+
[NAND_ECC_RS] = "rs",
57805781
};
57815782

57825783
static int of_get_nand_ecc_algo(struct device_node *np)

‎include/linux/mtd/rawnand.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ enum nand_ecc_algo {
121121
NAND_ECC_UNKNOWN,
122122
NAND_ECC_HAMMING,
123123
NAND_ECC_BCH,
124+
NAND_ECC_RS,
124125
};
125126

126127
/*

0 commit comments

Comments
 (0)