mtd: rawnand: Move the nand_ecc_algo enum to the generic NAND layer
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 27 Aug 2020 08:51:51 +0000 (10:51 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 27 Aug 2020 08:56:00 +0000 (10:56 +0200)
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
include/linux/mtd/nand.h
include/linux/mtd/rawnand.h

index af99041ceaa9f63b95c34ad628cfcff2961e03a5..986c7de833268a24015cda718cf3869e35165fbb 100644 (file)
@@ -115,6 +115,20 @@ struct nand_page_io_req {
        int mode;
 };
 
+/**
+ * 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
index 8174c0c331a1e237a194b71c898dfb8308dce328..10bbfbf4ad7feb076c95f5c6b61d02504556e8c8 100644 (file)
@@ -92,20 +92,6 @@ enum nand_ecc_mode {
        NAND_ECC_ON_DIE,
 };
 
-/**
- * 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,
-};
-
 /*
  * Constants for Hardware ECC
  */