core/psd/imx6ull/bch.c
static void encode_bch_unaligned(struct bch_control *bch,
				 const unsigned char *data, unsigned int len,
				 uint32_t *ecc)
{
	int i;
	const uint32_t *p;
	const int l = BCH_ECC_WORDS(bch)-1;

	printf("!!!!WARNNING, source data is not align\n");
	while (len--) {
		p = bch->mod8_tab + (l+1)*(((ecc[0] >> 24)^(*data++)) & 0xff);

		for (i = 0; i < l; i++)
			ecc[i] = ((ecc[i] << 8)|(ecc[i+1] >> 24))^(*p++);

		ecc[l] = (ecc[l] << 8)^(*p);
	}
}
/*
 * same as encode_bch(), but process input data one byte at a time
 */
same as encode_bch(), but process input data one byte at a time
same as encode_bch () but process input data one byte at a time
static void encode_bch_unaligned(struct bch_control *bch,
				 const unsigned char *data, unsigned int len,
				 uint32_t *ecc)
{
	int i;
	const uint32_t *p;
	const int l = BCH_ECC_WORDS(bch)-1;
	printf("!!!!WARNNING, source data is not align\n");
	while (len--) {
		p = bch->mod8_tab + (l+1)*(((ecc[0] >> 24)^(*data++)) & 0xff);
		for (i = 0; i < l; i++)
			ecc[i] = ((ecc[i] << 8)|(ecc[i+1] >> 24))^(*p++);
		ecc[l] = (ecc[l] << 8)^(*p);
	}
}
static void encode_bch_unaligned ( struct bch_control * bch , const unsigned char * data , unsigned int len , uint32_t * ecc ) { int i ; const uint32_t * p ; const int l = BCH_ECC_WORDS ( bch ) - 1 ; printf ( " \n " ) ; while ( len -- ) { p = bch -> mod8_tab + ( l + 1 ) * ( ( ( ecc [ 0 ] >> 24 ) ^ ( * data ++ ) ) & 0xff ) ; for ( i = 0 ; i < l ; i ++ ) ecc [ i ] = ( ( ecc [ i ] << 8 ) | ( ecc [ i + 1 ] >> 24 ) ) ^ ( * p ++ ) ; ecc [ l ] = ( ecc [ l ] << 8 ) ^ ( * p ) ; } }
same as encode_bch(), but process input data one byte at a time
same as encode_bch () but process input data one byte at a time