Lines Matching refs:eccsize
104 * Initialize NAND BCH error correction. Parameters @eccsize and @eccbytes
107 * required to store m*t bits, where m is such that 2^m-1 > @eccsize*8.
110 * @eccsize = 512 (thus, m=13 is the smallest integer such that 2^m-1 > 512*8)
120 unsigned int eccsize = nand->ecc.size;
125 eccbytes = DIV_ROUND_UP(eccstrength * fls(8 * eccsize), 8);
129 if (!eccsize || !eccbytes) {
134 m = fls(1+8*eccsize);
152 eccsteps = mtd->writesize/eccsize;
185 if (8*(eccsize+eccbytes) >= (1 << m)) {
186 printk(KERN_WARNING "eccsize %u is too large\n", eccsize);
201 erased_page = kmalloc(eccsize, GFP_KERNEL);
205 memset(erased_page, 0xff, eccsize);
207 encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask);
214 nand->ecc.strength = (eccbytes * 8) / fls(8 * eccsize);