aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-08-27 10:51:51 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-08-27 10:56:00 +0200
commitf2f64c1e924131878179da64794d9cb18ee5c827 (patch)
treef0cf2dad45de8077d0163c157eccd58853c37336 /include/linux/mtd/nand.h
parentmtd: rawnand: Rename the ECC algorithm enumeration items (diff)
downloadlinux-dev-f2f64c1e924131878179da64794d9cb18ee5c827.tar.xz
linux-dev-f2f64c1e924131878179da64794d9cb18ee5c827.zip
mtd: rawnand: Move the nand_ecc_algo enum to the generic NAND layer
This enumeration is generic and will be reused NAND-wide. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-4-miquel.raynal@bootlin.com
Diffstat (limited to '')
-rw-r--r--include/linux/mtd/nand.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index af99041ceaa9..986c7de83326 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -116,6 +116,20 @@ struct nand_page_io_req {
};
/**
+ * enum nand_ecc_algo - NAND ECC algorithm
+ * @NAND_ECC_ALGO_UNKNOWN: Unknown algorithm
+ * @NAND_ECC_ALGO_HAMMING: Hamming algorithm
+ * @NAND_ECC_ALGO_BCH: Bose-Chaudhuri-Hocquenghem algorithm
+ * @NAND_ECC_ALGO_RS: Reed-Solomon algorithm
+ */
+enum nand_ecc_algo {
+ NAND_ECC_ALGO_UNKNOWN,
+ NAND_ECC_ALGO_HAMMING,
+ NAND_ECC_ALGO_BCH,
+ NAND_ECC_ALGO_RS,
+};
+
+/**
* struct nand_ecc_props - NAND ECC properties
* @strength: ECC strength
* @step_size: Number of bytes per step