• pekon gupta's avatar
    mtd: nand: omap: add support for BCH16_ECC - NAND driver updates · 9748fff9
    pekon gupta authored
    This patch add support for BCH16 ecc-scheme in OMAP NAND driver, by extending
    following functions:
     - omap_enable_hwecc (nand_chip->ecc.hwctl): configure GPMC controller
     - omap_calculate_ecc_bch (nand_chip->ecc.calculate): fetch ECC signature from GPMC controller
     - omap_elm_correct_data (nand_chip->ecc.correct): detect and correct ECC errors using ELM
    
    (a) BCH16 ecc-scheme can detect and correct 16 bit-flips per 512Bytes of data.
    (b) BCH16 ecc-scheme generates 26-bytes of ECC syndrome / 512B.
    Due to (b) this scheme can only be used with NAND devices which have enough
    OOB to satisfy the relation: "OOBsize per page >= 26 * (page-size / 512)"
    Signed-off-by: default avatarPekon Gupta <pekon@ti.com>
    Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
    9748fff9
omap2.c 58.7 KB