• Ivan Djelic's avatar
    mtd: nand: add software BCH ECC support · 193bd400
    Ivan Djelic authored
    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: default avatarIvan Djelic <ivan.djelic@parrot.com>
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    193bd400
nand_bch.c 6.95 KB