Lines Matching full:bch
4 * using binary BCH codes. It relies on the generic BCH library lib/bch.c.
17 #include <linux/bch.h>
20 * struct nand_bch_control - private NAND BCH control structure
21 * @bch: BCH control structure
26 struct bch_control *bch; member
44 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
70 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
91 * nand_bch_init - [NAND Interface] Initialize NAND BCH error correction
95 * a pointer to a new NAND BCH control structure, or NULL upon failure
97 * Initialize NAND BCH error correction. Parameters @eccsize and @eccbytes
98 * are used to compute BCH parameters m (Galois field order) and t (error
133 nbc->bch = init_bch(m, t, 0); in nand_bch_init()
134 if (!nbc->bch) in nand_bch_init()
138 if (nbc->bch->ecc_bytes != eccbytes) { in nand_bch_init()
140 eccbytes, nbc->bch->ecc_bytes); in nand_bch_init()
185 encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask); in nand_bch_init()
202 * nand_bch_free - [NAND Interface] Release NAND BCH ECC resources
203 * @nbc: NAND BCH control structure
208 free_bch(nbc->bch); in nand_bch_free()
218 MODULE_DESCRIPTION("NAND software BCH ECC support");