Lines Matching defs:ecc

30  * Call bch_encode to compute and store ecc parity bytes to a given buffer.
131 uint32_t *ecc)
140 p = bch->mod8_tab + (l+1)*(((ecc[0] >> 24)^(tmp)) & 0xff);
143 ecc[i] = ((ecc[i] << 8)|(ecc[i+1] >> 24))^(*p++);
145 ecc[l] = (ecc[l] << 8)^(*p);
150 * convert ecc bytes to aligned, zero-padded 32-bit ecc words
172 * convert 32-bit ecc words to ecc bytes
194 * bch_encode - calculate BCH ecc parity of data
198 * @ecc: ecc parity data, must be initialized by caller
200 * The @ecc parity array is used both as input and output parameter, in order to
204 * The exact number of computed ecc parity bits is given by member @ecc_bits of
208 unsigned int len, uint8_t *ecc)
224 if (ecc) {
225 /* load ecc parity bytes into internal 32-bit buffer */
226 load_ecc8(bch, bch->ecc_buf, ecc);
283 /* store ecc parity bytes into original parity buffer */
284 if (ecc)
285 store_ecc8(bch, ecc, bch->ecc_buf);
368 * compute 2t syndromes of ecc polynomial, i.e. ecc(a^j) for j=1..2t
370 static void compute_syndromes(struct bch_control *bch, uint32_t *ecc,
380 /* make sure extra bits in last ecc word are cleared */
383 ecc[s/32] &= ~((1u << (32-m))-1);
388 poly = *ecc++;
982 * @recv_ecc: received ecc, if NULL then assume it was XORed in @calc_ecc
983 * @calc_ecc: calculated ecc, if NULL then calc_ecc is computed from @data
1001 * by providing ecc = recv_ecc XOR calc_ecc:
1002 * bch_decode(@bch, NULL, @len, NULL, ecc, NULL, @errloc)
1010 * if (errloc[n] >= 8*len), then n-th error is located in ecc (no need for
1035 /* compute received data ecc into an internal buffer */
1040 /* load provided calculated ecc */
1043 /* load received ecc or assume it was XORed in calc_ecc */
1046 /* XOR received and calculated ecc */
1282 * BCH control structure, ecc length in bytes is given by member @ecc_bytes of