diff options
author | Ivan Djelic <ivan.djelic@parrot.com> | 2011-03-11 10:05:33 (GMT) |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-03-11 17:49:08 (GMT) |
commit | 193bd40026443835e1b96c79d5efe559d01509ae (patch) | |
tree | 979bace7cd9806753c95867c6df89fe2de98fc73 /drivers/mtd/nand/Kconfig | |
parent | 89d8d32060de17c23f761df74799c7c07b79dd01 (diff) | |
download | linux-193bd40026443835e1b96c79d5efe559d01509ae.tar.xz |
mtd: nand: add software BCH ECC support
This patch adds software BCH ECC support to mtd, in order to handle recent
NAND device ecc requirements (4 bits or more).
It does so by adding a new ecc mode (NAND_ECC_SOFT_BCH) for use by board
drivers, and a new Kconfig option to enable BCH support. It relies on the
generic BCH library introduced in a previous patch.
When a board driver uses mode NAND_ECC_SOFT_BCH, it should also set fields
chip->ecc.size and chip->ecc.bytes to select BCH ecc data size and required
error correction capability. See nand_bch_init() documentation for details.
It has been tested on the following platforms using mtd-utils, UBI and
UBIFS: x86 (with nandsim), arm926ejs.
Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/Kconfig')
-rw-r--r-- | drivers/mtd/nand/Kconfig | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index c895922..78205ac 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -31,6 +31,21 @@ config MTD_NAND_VERIFY_WRITE device thinks the write was successful, a bit could have been flipped accidentally due to device wear or something else. +config MTD_NAND_BCH + tristate + select BCH + depends on MTD_NAND_ECC_BCH + default MTD_NAND + +config MTD_NAND_ECC_BCH + bool "Support software BCH ECC" + default n + help + This enables support for software BCH error correction. Binary BCH + codes are more powerful and cpu intensive than traditional Hamming + ECC codes. They are used with NAND devices requiring more than 1 bit + of error correction. + config MTD_SM_COMMON tristate default n |