Lines Matching refs:bits_per_block
25 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_bbt_init() local
27 unsigned int nwords = DIV_ROUND_UP(nblocks * bits_per_block, in nanddev_bbt_init()
77 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_bbt_get_block_status() local
79 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_get_block_status()
80 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_get_block_status()
87 if (bits_per_block + offs > BITS_PER_LONG) in nanddev_bbt_get_block_status()
90 return status & GENMASK(bits_per_block - 1, 0); in nanddev_bbt_get_block_status()
110 unsigned int bits_per_block = fls(NAND_BBT_BLOCK_NUM_STATUS); in nanddev_bbt_set_block_status() local
112 ((entry * bits_per_block) / BITS_PER_LONG); in nanddev_bbt_set_block_status()
113 unsigned int offs = (entry * bits_per_block) % BITS_PER_LONG; in nanddev_bbt_set_block_status()
114 unsigned long val = status & GENMASK(bits_per_block - 1, 0); in nanddev_bbt_set_block_status()
119 pos[0] &= ~GENMASK(offs + bits_per_block - 1, offs); in nanddev_bbt_set_block_status()
122 if (bits_per_block + offs > BITS_PER_LONG) { in nanddev_bbt_set_block_status()
123 unsigned int rbits = bits_per_block + offs - BITS_PER_LONG; in nanddev_bbt_set_block_status()
126 pos[1] |= val >> (bits_per_block - rbits); in nanddev_bbt_set_block_status()