Lines Matching refs:ecc
45 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_calculate_ecc()
48 memset(code, 0, chip->ecc.bytes); in nand_bch_calculate_ecc()
49 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
52 for (i = 0; i < chip->ecc.bytes; i++) in nand_bch_calculate_ecc()
71 struct nand_bch_control *nbc = chip->ecc.priv; in nand_bch_correct_data()
75 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
79 if (errloc[i] < (chip->ecc.size*8)) in nand_bch_correct_data()
114 struct nand_ecclayout *layout = nand->ecc.layout; in nand_bch_init()
117 unsigned int eccsize = nand->ecc.size; in nand_bch_init()
118 unsigned int eccbytes = nand->ecc.bytes; in nand_bch_init()
119 unsigned int eccstrength = nand->ecc.strength; in nand_bch_init()
123 nand->ecc.bytes = eccbytes; in nand_bch_init()
178 nand->ecc.layout = layout; in nand_bch_init()
211 nand->ecc.strength = (eccbytes * 8) / fls(8 * eccsize); in nand_bch_init()