Home
last modified time | relevance | path

Searched refs:bbt (Results 1 - 25 of 40) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/mtd/tests/
H A Dspeedtest.c35 static unsigned char *bbt; variable
229 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_speedtest_init()
230 if (!bbt) in mtd_speedtest_init()
232 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_speedtest_init()
236 if (!bbt[i]) in mtd_speedtest_init()
240 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_speedtest_init()
248 if (bbt[i]) in mtd_speedtest_init()
266 if (bbt[i]) in mtd_speedtest_init()
280 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_speedtest_init()
288 if (bbt[ in mtd_speedtest_init()
[all...]
H A Dpagetest.c32 static unsigned char *bbt; variable
58 for (i = 0; i < ebcnt && bbt[i]; ++i) in verify_eraseblock()
62 for (i = 0; i < ebcnt && bbt[ebcnt - i - 1]; ++i) in verify_eraseblock()
85 if (addr <= addrn - pgsize - pgsize && !bbt[ebnum + 1]) { in verify_eraseblock()
126 for (i = 0; i < ebcnt && bbt[i]; ++i) in crosstest()
130 for (i = 0; i < ebcnt && bbt[ebcnt - i - 1]; ++i) in crosstest()
198 for (i = 0; i < ebcnt && bbt[i]; ++i) { in erasecrosstest()
204 while (ebnum2 && bbt[ebnum2]) in erasecrosstest()
276 for (i = 0; i < ebcnt && bbt[i]; ++i) { in erasetest()
372 bbt in mtd_pagetest_init()
[all...]
H A Doobtest.c34 static unsigned char *bbt; variable
96 if (bbt[i]) in write_whole_device()
320 if (bbt[i]) in verify_all_eraseblocks()
385 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_oobtest_init()
386 if (!bbt) in mtd_oobtest_init()
389 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_oobtest_init()
401 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_oobtest_init()
421 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_oobtest_init()
434 if (bbt[i]) in mtd_oobtest_init()
454 err = mtdtest_erase_good_eraseblocks(mtd, bbt, in mtd_oobtest_init()
[all...]
H A Dstresstest.c35 static unsigned char *bbt; variable
51 if (bbt[eb]) in rand_eb()
81 if (bbt[eb + 1]) { in do_read()
106 if (bbt[eb + 1]) in do_write()
197 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_stresstest_init()
198 if (!bbt) in mtd_stresstest_init()
200 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_stresstest_init()
221 kfree(bbt); in mtd_stresstest_init()
H A Dsubpagetest.c29 static unsigned char *bbt; variable
252 if (bbt[i]) in verify_all_eraseblocks_ff()
317 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_subpagetest_init()
318 if (!bbt) in mtd_subpagetest_init()
321 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_subpagetest_init()
325 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_subpagetest_init()
332 if (bbt[i]) in mtd_subpagetest_init()
349 if (bbt[i]) in mtd_subpagetest_init()
363 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_subpagetest_init()
375 if (bbt[ in mtd_subpagetest_init()
[all...]
H A Dmtd_test.c41 int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, in mtdtest_scan_for_bad_eraseblocks() argument
51 bbt[i] = is_block_bad(mtd, eb + i) ? 1 : 0; in mtdtest_scan_for_bad_eraseblocks()
52 if (bbt[i]) in mtdtest_scan_for_bad_eraseblocks()
61 int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, in mtdtest_erase_good_eraseblocks() argument
68 if (bbt[i]) in mtdtest_erase_good_eraseblocks()
H A Dreadtest.c29 static unsigned char *bbt; variable
161 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_readtest_init()
162 if (!bbt) in mtd_readtest_init()
164 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_readtest_init()
173 if (bbt[i]) in mtd_readtest_init()
198 kfree(bbt); in mtd_readtest_init()
H A Dmtd_test.h17 int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
19 int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
/kernel/linux/linux-6.6/drivers/mtd/tests/
H A Dspeedtest.c35 static unsigned char *bbt; variable
228 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_speedtest_init()
229 if (!bbt) in mtd_speedtest_init()
231 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_speedtest_init()
235 if (!bbt[i]) in mtd_speedtest_init()
239 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_speedtest_init()
247 if (bbt[i]) in mtd_speedtest_init()
265 if (bbt[i]) in mtd_speedtest_init()
279 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_speedtest_init()
287 if (bbt[ in mtd_speedtest_init()
[all...]
H A Dpagetest.c32 static unsigned char *bbt; variable
58 for (i = 0; i < ebcnt && bbt[i]; ++i) in verify_eraseblock()
62 for (i = 0; i < ebcnt && bbt[ebcnt - i - 1]; ++i) in verify_eraseblock()
85 if (addr <= addrn - pgsize - pgsize && !bbt[ebnum + 1]) { in verify_eraseblock()
126 for (i = 0; i < ebcnt && bbt[i]; ++i) in crosstest()
130 for (i = 0; i < ebcnt && bbt[ebcnt - i - 1]; ++i) in crosstest()
198 for (i = 0; i < ebcnt && bbt[i]; ++i) { in erasecrosstest()
204 while (ebnum2 && bbt[ebnum2]) in erasecrosstest()
276 for (i = 0; i < ebcnt && bbt[i]; ++i) { in erasetest()
372 bbt in mtd_pagetest_init()
[all...]
H A Doobtest.c34 static unsigned char *bbt; variable
96 if (bbt[i]) in write_whole_device()
320 if (bbt[i]) in verify_all_eraseblocks()
385 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_oobtest_init()
386 if (!bbt) in mtd_oobtest_init()
389 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_oobtest_init()
401 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_oobtest_init()
421 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_oobtest_init()
434 if (bbt[i]) in mtd_oobtest_init()
454 err = mtdtest_erase_good_eraseblocks(mtd, bbt, in mtd_oobtest_init()
[all...]
H A Dstresstest.c35 static unsigned char *bbt; variable
50 if (bbt[eb]) in rand_eb()
72 if (bbt[eb + 1]) { in do_read()
97 if (bbt[eb + 1]) in do_write()
188 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_stresstest_init()
189 if (!bbt) in mtd_stresstest_init()
191 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_stresstest_init()
212 kfree(bbt); in mtd_stresstest_init()
H A Dsubpagetest.c29 static unsigned char *bbt; variable
252 if (bbt[i]) in verify_all_eraseblocks_ff()
317 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_subpagetest_init()
318 if (!bbt) in mtd_subpagetest_init()
321 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_subpagetest_init()
325 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_subpagetest_init()
332 if (bbt[i]) in mtd_subpagetest_init()
349 if (bbt[i]) in mtd_subpagetest_init()
363 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_subpagetest_init()
375 if (bbt[ in mtd_subpagetest_init()
[all...]
H A Dmtd_test.c41 int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, in mtdtest_scan_for_bad_eraseblocks() argument
51 bbt[i] = is_block_bad(mtd, eb + i) ? 1 : 0; in mtdtest_scan_for_bad_eraseblocks()
52 if (bbt[i]) in mtdtest_scan_for_bad_eraseblocks()
61 int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, in mtdtest_erase_good_eraseblocks() argument
68 if (bbt[i]) in mtdtest_erase_good_eraseblocks()
H A Dreadtest.c29 static unsigned char *bbt; variable
161 bbt = kzalloc(ebcnt, GFP_KERNEL); in mtd_readtest_init()
162 if (!bbt) in mtd_readtest_init()
164 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_readtest_init()
173 if (bbt[i]) in mtd_readtest_init()
198 kfree(bbt); in mtd_readtest_init()
H A Dmtd_test.h17 int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
19 int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
/kernel/linux/linux-5.10/drivers/mtd/nand/
H A Dbbt.c10 #define pr_fmt(fmt) "nand-bbt: " fmt
30 nand->bbt.cache = kcalloc(nwords, sizeof(*nand->bbt.cache), in nanddev_bbt_init()
32 if (!nand->bbt.cache) in nanddev_bbt_init()
47 kfree(nand->bbt.cache); in nanddev_bbt_cleanup()
55 * Update the BBT. Currently a NOP function since on-flash bbt is not yet
78 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_get_block_status()
111 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_set_block_status()
H A DMakefile3 nandcore-objs := core.o bbt.o
/kernel/linux/linux-6.6/drivers/mtd/nand/
H A Dbbt.c10 #define pr_fmt(fmt) "nand-bbt: " fmt
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()
44 bitmap_free(nand->bbt.cache); in nanddev_bbt_cleanup()
52 * Update the BBT. Currently a NOP function since on-flash bbt is not yet
75 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_get_block_status()
108 unsigned long *pos = nand->bbt.cache + in nanddev_bbt_set_block_status()
H A DMakefile3 nandcore-objs := core.o bbt.o
/kernel/linux/linux-5.10/drivers/mtd/nand/onenand/
H A Donenand_bbt.c103 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); in create_bbt()
128 * The function creates a memory based bbt by scanning the device
153 res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; in onenand_isbad_bbt()
155 pr_debug("onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", in onenand_isbad_bbt()
189 bbm->bbt = kzalloc(len, GFP_KERNEL); in onenand_scan_bbt()
190 if (!bbm->bbt) in onenand_scan_bbt()
202 kfree(bbm->bbt); in onenand_scan_bbt()
203 bbm->bbt = NULL; in onenand_scan_bbt()
/kernel/linux/linux-6.6/drivers/mtd/nand/onenand/
H A Donenand_bbt.c103 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); in create_bbt()
128 * The function creates a memory based bbt by scanning the device
153 res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; in onenand_isbad_bbt()
155 pr_debug("onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", in onenand_isbad_bbt()
189 bbm->bbt = kzalloc(len, GFP_KERNEL); in onenand_scan_bbt()
190 if (!bbm->bbt) in onenand_scan_bbt()
202 kfree(bbm->bbt); in onenand_scan_bbt()
203 bbm->bbt = NULL; in onenand_scan_bbt()
/kernel/linux/linux-5.10/include/linux/mtd/
H A Dbbm.h21 * @pages: the page(s) where we find the bbt, used with option BBT_ABSPAGE
22 * when bbt is searched, then we store the found bbts pages here.
25 * @veroffs: offset of the bbt version counter in the oob are of the page
26 * @version: version read from the bbt page during scan
28 * @maxblocks: maximum number of blocks to search for a bbt. This number of
32 * bad) block in the stored bbt
55 /* The number of bits used per block in the bbt on the device */
63 /* The bbt is at the given page, else we must scan for the bbt */
65 /* bbt i
130 uint8_t *bbt; global() member
[all...]
/kernel/linux/linux-6.6/include/linux/mtd/
H A Dbbm.h21 * @pages: the page(s) where we find the bbt, used with option BBT_ABSPAGE
22 * when bbt is searched, then we store the found bbts pages here.
25 * @veroffs: offset of the bbt version counter in the oob are of the page
26 * @version: version read from the bbt page during scan
28 * @maxblocks: maximum number of blocks to search for a bbt. This number of
32 * bad) block in the stored bbt
55 /* The number of bits used per block in the bbt on the device */
63 /* The bbt is at the given page, else we must scan for the bbt */
65 /* bbt i
130 uint8_t *bbt; global() member
[all...]
/kernel/linux/linux-5.10/drivers/mtd/nand/raw/
H A Dnand_bbt.c46 * 10b: block is reserved (to protect the bbt area)
53 * - the space necessary for a bbt in FLASH does not exceed a block boundary
78 uint8_t entry = chip->bbt[block >> BBT_ENTRY_SHIFT]; in bbt_get_entry()
87 chip->bbt[block >> BBT_ENTRY_SHIFT] |= msk; in bbt_mark_entry()
160 * @num: the number of bbt descriptors to read
161 * @td: the bbt describtion table
257 * that the bbt bits are in consecutive order.
387 * assume that the bbt bits are in consecutive order.
517 * NAND_BBT_PERCHIP is given, each chip is searched for a bbt, which contains
521 * The bbt iden
[all...]

Completed in 12 milliseconds

12