Lines Matching refs:ecc
40 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_calculate_ecc()
43 memset(code, 0, chip->ecc.bytes); in nand_bch_calculate_ecc()
44 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
47 for (i = 0; i < chip->ecc.bytes; i++) in nand_bch_calculate_ecc()
66 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_correct_data()
70 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
74 if (errloc[i] < (chip->ecc.size*8)) in nand_bch_correct_data()
112 unsigned int eccsize = nand->ecc.size; in nand_bch_init()
113 unsigned int eccbytes = nand->ecc.bytes; in nand_bch_init()
114 unsigned int eccstrength = nand->ecc.strength; in nand_bch_init()
118 nand->ecc.bytes = eccbytes; in nand_bch_init()
166 nand->ecc.steps = eccsteps; in nand_bch_init()
167 nand->ecc.total = eccsteps * eccbytes; in nand_bch_init()
192 nand->ecc.strength = (eccbytes * 8) / fls(8 * eccsize); in nand_bch_init()