Lines Matching full:nand
10 #define pr_fmt(fmt) "nand-bbt: " fmt
12 #include <linux/mtd/nand.h>
17 * @nand: NAND device
23 int nanddev_bbt_init(struct nand_device *nand) in nanddev_bbt_init() argument
26 unsigned int nblocks = nanddev_neraseblocks(nand); in nanddev_bbt_init()
28 nand->bbt.cache = bitmap_zalloc(nblocks * bits_per_block, GFP_KERNEL); in nanddev_bbt_init()
29 if (!nand->bbt.cache) in nanddev_bbt_init()
38 * @nand: NAND device
42 void nanddev_bbt_cleanup(struct nand_device *nand) in nanddev_bbt_cleanup() argument
44 bitmap_free(nand->bbt.cache); in nanddev_bbt_cleanup()
50 * @nand: nand device
57 int nanddev_bbt_update(struct nand_device *nand) in nanddev_bbt_update() argument
65 * @nand: nand device
71 int nanddev_bbt_get_block_status(const struct nand_device *nand, in nanddev_bbt_get_block_status() argument
75 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_get_block_status()
80 if (entry >= nanddev_neraseblocks(nand)) in nanddev_bbt_get_block_status()
94 * @nand: nand device
99 * the NAND you should call nanddev_bbt_update().
104 int nanddev_bbt_set_block_status(struct nand_device *nand, unsigned int entry, in nanddev_bbt_set_block_status() argument
108 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_set_block_status()
113 if (entry >= nanddev_neraseblocks(nand)) in nanddev_bbt_set_block_status()