Lines Matching refs:eccbytes
97 * Initialize NAND BCH error correction. Parameters @eccsize and @eccbytes
99 * correction capability). @eccbytes should be equal to the number of bytes
104 * @eccbytes = 7 (7 bytes are required to store m*t = 13*4 = 52 bits)
113 unsigned int eccbytes = nand->ecc.bytes;
116 if (!eccbytes && eccstrength) {
117 eccbytes = DIV_ROUND_UP(eccstrength * fls(8 * eccsize), 8);
118 nand->ecc.bytes = eccbytes;
121 if (!eccsize || !eccbytes) {
127 t = (eccbytes*8)/m;
137 /* verify that eccbytes has the expected value */
138 if (nbc->bch->ecc_bytes != eccbytes) {
139 pr_warn("invalid eccbytes %u, should be %u\n",
140 eccbytes, nbc->bch->ecc_bytes);
153 if (8*(eccsize+eccbytes) >= (1 << m)) {
167 nand->ecc.total = eccsteps * eccbytes;
169 if (mtd_ooblayout_count_eccbytes(mtd) != (eccsteps*eccbytes)) {
174 nbc->eccmask = kzalloc(eccbytes, GFP_KERNEL);
189 for (i = 0; i < eccbytes; i++)
193 nand->ecc.strength = (eccbytes * 8) / fls(8 * eccsize);