Lines Matching refs:eccbytes
120 unsigned int eccbytes = nand->ecc.bytes; in nand_bch_init() local
123 if (!eccbytes && eccstrength) { in nand_bch_init()
124 eccbytes = DIV_ROUND_UP(eccstrength * fls(8 * eccsize), 8); in nand_bch_init()
125 nand->ecc.bytes = eccbytes; in nand_bch_init()
128 if (!eccsize || !eccbytes) { in nand_bch_init()
134 t = (eccbytes*8)/m; in nand_bch_init()
145 if (nbc->bch->ecc_bytes != eccbytes) { in nand_bch_init()
147 eccbytes, nbc->bch->ecc_bytes); in nand_bch_init()
164 layout->eccbytes = eccsteps*eccbytes; in nand_bch_init()
167 if (layout->eccbytes+2 > mtd->oobsize) { in nand_bch_init()
170 eccbytes); in nand_bch_init()
174 for (i = 0; i < layout->eccbytes; i++) in nand_bch_init()
175 layout->eccpos[i] = mtd->oobsize-layout->eccbytes+i; in nand_bch_init()
178 layout->oobfree[0].length = mtd->oobsize-2-layout->eccbytes; in nand_bch_init()
184 if (8*(eccsize+eccbytes) >= (1 << m)) { in nand_bch_init()
188 if (layout->eccbytes != (eccsteps*eccbytes)) { in nand_bch_init()
193 nbc->eccmask = kmalloc(eccbytes, GFP_KERNEL); in nand_bch_init()
205 memset(nbc->eccmask, 0, eccbytes); in nand_bch_init()
209 for (i = 0; i < eccbytes; i++) in nand_bch_init()
213 nand->ecc.strength = (eccbytes * 8) / fls(8 * eccsize); in nand_bch_init()