Lines Matching full:bch
3 * using binary BCH codes. It relies on the generic BCH library lib/bch.c.
18 #include <linux/bch.h>
22 * struct nand_bch_control - private NAND BCH control structure
23 * @bch: BCH control structure
24 * @ecclayout: private ecc layout for this BCH configuration
29 struct bch_control *bch; member
49 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
75 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
95 * nand_bch_init - [NAND Interface] Initialize NAND BCH error correction
99 * a pointer to a new NAND BCH control structure, or NULL upon failure
101 * Initialize NAND BCH error correction. Parameters @eccsize and @eccbytes
102 * are used to compute BCH parameters m (Galois field order) and t (error
138 nbc->bch = init_bch(m, t, 0); in nand_bch_init()
139 if (!nbc->bch) in nand_bch_init()
143 if (nbc->bch->ecc_bytes != eccbytes) { in nand_bch_init()
145 eccbytes, nbc->bch->ecc_bytes); in nand_bch_init()
204 encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask); in nand_bch_init()
220 * nand_bch_free - [NAND Interface] Release NAND BCH ECC resources
221 * @nbc: NAND BCH control structure
226 free_bch(nbc->bch); in nand_bch_free()