1/*
2 * This header was generated from the Linux kernel headers by update_headers.py,
3 * to provide necessary information from kernel to userspace, such as constants,
4 * structures, and macros, and thus, contains no copyrightable information.
5 */
6#ifndef __MTD_NFTL_USER_H__
7#define __MTD_NFTL_USER_H__
8#include <linux/types.h>
9struct nftl_bci {
10	unsigned char ECCSig[6];
11	__u8 Status;
12	__u8 Status1;
13}__attribute__((packed));
14struct nftl_uci0 {
15	__u16 VirtUnitNum;
16	__u16 ReplUnitNum;
17	__u16 SpareVirtUnitNum;
18	__u16 SpareReplUnitNum;
19} __attribute__((packed));
20struct nftl_uci1 {
21	__u32 WearInfo;
22	__u16 EraseMark;
23	__u16 EraseMark1;
24} __attribute__((packed));
25struct nftl_uci2 {
26        __u16 FoldMark;
27        __u16 FoldMark1;
28	__u32 unused;
29} __attribute__((packed));
30union nftl_uci {
31	struct nftl_uci0 a;
32	struct nftl_uci1 b;
33	struct nftl_uci2 c;
34};
35struct nftl_oob {
36	struct nftl_bci b;
37	union nftl_uci u;
38};
39struct NFTLMediaHeader {
40	char DataOrgID[6];
41	__u16 NumEraseUnits;
42	__u16 FirstPhysicalEUN;
43	__u32 FormattedSize;
44	unsigned char UnitSizeFactor;
45} __attribute__((packed));
46#define MAX_ERASE_ZONES (8192 - 512)
47#define ERASE_MARK 0x3c69
48#define SECTOR_FREE 0xff
49#define SECTOR_USED 0x55
50#define SECTOR_IGNORE 0x11
51#define SECTOR_DELETED 0x00
52#define FOLD_MARK_IN_PROGRESS 0x5555
53#define ZONE_GOOD 0xff
54#define ZONE_BAD_ORIGINAL 0
55#define ZONE_BAD_MARKED 7
56#endif
57