Lines Matching defs: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)
26 unsigned int nblocks = nanddev_neraseblocks(nand);
30 nand->bbt.cache = kcalloc(nwords, sizeof(*nand->bbt.cache),
32 if (!nand->bbt.cache)
41 * @nand: NAND device
45 void nanddev_bbt_cleanup(struct nand_device *nand)
47 kfree(nand->bbt.cache);
53 * @nand: nand device
60 int nanddev_bbt_update(struct nand_device *nand)
68 * @nand: nand device
74 int nanddev_bbt_get_block_status(const struct nand_device *nand,
78 unsigned long *pos = nand->bbt.cache +
83 if (entry >= nanddev_neraseblocks(nand))
97 * @nand: nand device
107 int nanddev_bbt_set_block_status(struct nand_device *nand, unsigned int entry,
111 unsigned long *pos = nand->bbt.cache +
116 if (entry >= nanddev_neraseblocks(nand))