blob: 4b7bee17c924bb0f29c007812568bdadb3226924 [file] [log] [blame]
Akinobu Mita084db4b2013-08-03 18:52:07 +09001#include <linux/mtd/mtd.h>
Richard Weinberger2a6a28e72015-03-29 21:52:06 +02002#include <linux/sched.h>
3
4static inline int mtdtest_relax(void)
5{
6 cond_resched();
7 if (signal_pending(current)) {
8 pr_info("aborting test due to pending signal!\n");
9 return -EINTR;
10 }
11
12 return 0;
13}
Akinobu Mita084db4b2013-08-03 18:52:07 +090014
15int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum);
16int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
17 unsigned int eb, int ebcnt);
18int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
19 unsigned int eb, int ebcnt);
20
21int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf);
22int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size,
23 const void *buf);