Lines Matching full:bch
3 * using binary BCH codes. It relies on the generic BCH library lib/bch.c.
30 #include <linux/bch.h>
33 * struct nand_bch_control - private NAND BCH control structure
34 * @bch: BCH control structure
39 struct bch_control *bch; member
58 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
85 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
106 * nand_bch_init - [NAND Interface] Initialize NAND BCH error correction
110 * a pointer to a new NAND BCH control structure, or NULL upon failure
112 * Initialize NAND BCH error correction. Parameters @eccsize and @eccbytes
113 * are used to compute BCH parameters m (Galois field order) and t (error
148 nbc->bch = init_bch(m, t, 0); in nand_bch_init()
149 if (!nbc->bch) in nand_bch_init()
153 if (nbc->bch->ecc_bytes != eccbytes) { in nand_bch_init()
155 eccbytes, nbc->bch->ecc_bytes); in nand_bch_init()
201 encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask); in nand_bch_init()
218 * nand_bch_free - [NAND Interface] Release NAND BCH ECC resources
219 * @nbc: NAND BCH control structure
224 free_bch(nbc->bch); in nand_bch_free()
234 MODULE_DESCRIPTION("NAND software BCH ECC support");