summaryrefslogtreecommitdiffstats
path: root/include/mtd/mtd-peb.h
blob: 311f25c3df4495dd85c891c7080b2b49a75f63a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef __LINUX_MTD_MTDPEB_H
#define __LINUX_MTD_MTDPEB_H

#include <linux/mtd/mtd.h>

int mtd_peb_read(struct mtd_info *mtd, void *buf, int pnum, int offset,
		int len);
int mtd_peb_write(struct mtd_info *mtd, const void *buf, int pnum, int offset,
		 int len);

int mtd_peb_torture(struct mtd_info *mtd, int pnum);
int mtd_peb_erase(struct mtd_info *mtd, int pnum);
int mtd_peb_mark_bad(struct mtd_info *mtd, int pnum);
int mtd_peb_is_bad(struct mtd_info *mtd, int pnum);
int mtd_skip_bad(struct mtd_info *mtd, int *pnum);
int mtd_peb_check_all_ff(struct mtd_info *mtd, int pnum, int offset, int len,
			 int warn);
int mtd_peb_verify(struct mtd_info *mtd, const void *buf, int pnum,
				int offset, int len);
int mtd_num_pebs(struct mtd_info *mtd);
int mtd_peb_create_bitflips(struct mtd_info *mtd, int pnum, int offset,
				   int len, int num_bitflips, int random,
				   int info);
int mtd_peb_write_file(struct mtd_info *mtd, int peb_start, int max_pebs,
		       const void *buf, size_t len);

#endif /* __LINUX_MTD_MTDPEB_H */