Lines Matching full:bch
4 * using binary BCH codes. It relies on the generic BCH library lib/bch.c.
15 #include <linux/mtd/nand-ecc-sw-bch.h>
30 bch_encode(engine_conf->bch, buf, nand->ecc.ctx.conf.step_size, code); in nand_ecc_sw_bch_calculate()
57 count = bch_decode(engine_conf->bch, NULL, step_size, read_ecc, in nand_ecc_sw_bch_correct()
79 * nand_ecc_sw_bch_cleanup - Cleanup software BCH ECC resources
86 bch_free(engine_conf->bch); in nand_ecc_sw_bch_cleanup()
92 * nand_ecc_sw_bch_init - Initialize software BCH ECC engine
95 * Returns: a pointer to a new NAND BCH control structure, or NULL upon failure
97 * Initialize NAND BCH error correction. @nand.ecc parameters 'step_size' and
98 * 'bytes' are used to compute the following BCH parameters:
120 engine_conf->bch = bch_init(m, t, 0, false); in nand_ecc_sw_bch_init()
121 if (!engine_conf->bch) in nand_ecc_sw_bch_init()
140 bch_encode(engine_conf->bch, erased_page, eccsize, in nand_ecc_sw_bch_init()
148 if (engine_conf->bch->ecc_bytes != eccbytes) { in nand_ecc_sw_bch_init()
150 eccbytes, engine_conf->bch->ecc_bytes); in nand_ecc_sw_bch_init()
178 /* Only large page NAND chips may use BCH */ in nand_ecc_sw_bch_init_ctx()
180 pr_err("BCH cannot be used with small page NAND chips\n"); in nand_ecc_sw_bch_init_ctx()
406 MODULE_DESCRIPTION("NAND software BCH ECC support");