]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/mtd/nand.h
mtd: add datasheet's ECC information to nand_chip{}
[karo-tx-linux.git] / include / linux / mtd / nand.h
index 9f7b248c70fef951482cb4930c665804511bf445..fbf3bba372728334128d5a6a174f19a917cf9774 100644 (file)
@@ -437,6 +437,12 @@ struct nand_buffers {
  *                     bad block marker position; i.e., BBM == 11110111b is
  *                     not bad when badblockbits == 7
  * @cellinfo:          [INTERN] MLC/multichip data from chip ident
+ * @ecc_strength_ds:   [INTERN] ECC correctability from the datasheet.
+ *                     Minimum amount of bit errors per @ecc_step_ds guaranteed
+ *                     to be correctable. If unknown, set to zero.
+ * @ecc_step_ds:       [INTERN] ECC step required by the @ecc_strength_ds,
+ *                      also from the datasheet. It is the recommended ECC step
+ *                     size, if known; if unknown, set to zero.
  * @numchips:          [INTERN] number of physical chips
  * @chipsize:          [INTERN] the size of one chip for multichip arrays
  * @pagemask:          [INTERN] page number mask = number of (pages / chip) - 1
@@ -513,6 +519,8 @@ struct nand_chip {
        unsigned int pagebuf_bitflips;
        int subpagesize;
        uint8_t cellinfo;
+       uint16_t ecc_strength_ds;
+       uint16_t ecc_step_ds;
        int badblockpos;
        int badblockbits;