Lines Matching refs:ecc
47 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_calculate_ecc()
50 memset(code, 0, chip->ecc.bytes); in nand_bch_calculate_ecc()
51 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
54 for (i = 0; i < chip->ecc.bytes; i++) in nand_bch_calculate_ecc()
73 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_correct_data()
77 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
81 if (errloc[i] < (chip->ecc.size*8)) in nand_bch_correct_data()
116 struct nand_ecclayout *layout = nand->ecc.layout; in nand_bch_init()
119 unsigned int eccsize = nand->ecc.size; in nand_bch_init()
120 unsigned int eccbytes = nand->ecc.bytes; in nand_bch_init()
121 unsigned int eccstrength = nand->ecc.strength; in nand_bch_init()
125 nand->ecc.bytes = eccbytes; in nand_bch_init()
180 nand->ecc.layout = layout; in nand_bch_init()
213 nand->ecc.strength = (eccbytes * 8) / fls(8 * eccsize); in nand_bch_init()