Lines Matching refs:bits_per_block
108 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_read_bbt() local
110 unsigned int nbytes = DIV_ROUND_UP(nblocks * bits_per_block, in nanddev_read_bbt()
220 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_write_bbt() local
222 unsigned int nbytes = DIV_ROUND_UP(nblocks * bits_per_block, in nanddev_write_bbt()
302 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_bbt_format() local
303 unsigned int nwords = DIV_ROUND_UP(nblocks * bits_per_block, in nanddev_bbt_format()
395 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_bbt_init() local
397 unsigned int nwords = DIV_ROUND_UP(nblocks * bits_per_block, in nanddev_bbt_init()
516 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_bbt_get_block_status() local
518 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_get_block_status()
519 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_get_block_status()
532 if (bits_per_block + offs > BITS_PER_LONG) in nanddev_bbt_get_block_status()
535 return status & GENMASK(bits_per_block - 1, 0); in nanddev_bbt_get_block_status()
555 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_bbt_set_block_status() local
557 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_set_block_status()
558 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_set_block_status()
559 unsigned long val = status & GENMASK(bits_per_block - 1, 0); in nanddev_bbt_set_block_status()
564 if (offs + bits_per_block - 1 > (BITS_PER_LONG - 1)) in nanddev_bbt_set_block_status()
567 pos[0] &= ~GENMASK(offs + bits_per_block - 1, offs); in nanddev_bbt_set_block_status()
570 if (bits_per_block + offs > BITS_PER_LONG) { in nanddev_bbt_set_block_status()
573 pos[1] &= ~GENMASK(bits_per_block - rbits - 1, 0); in nanddev_bbt_set_block_status()