blob: 98a7e8a18afa7e394641e78e0edd8084b6f8524f [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __MTD_NFTL_USER_H__
20#define __MTD_NFTL_USER_H__
21#include <linux/types.h>
22struct nftl_bci {
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080024 unsigned char ECCSig[6];
25 __u8 Status;
26 __u8 Status1;
27} __attribute__((packed));
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29struct nftl_uci0 {
Tao Baod7db5942015-01-28 10:07:51 -080030 __u16 VirtUnitNum;
31 __u16 ReplUnitNum;
32 __u16 SpareVirtUnitNum;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 __u16 SpareReplUnitNum;
Ben Cheng655a7c02013-10-16 16:09:24 -070035} __attribute__((packed));
36struct nftl_uci1 {
Tao Baod7db5942015-01-28 10:07:51 -080037 __u32 WearInfo;
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 __u16 EraseMark;
40 __u16 EraseMark1;
Ben Cheng655a7c02013-10-16 16:09:24 -070041} __attribute__((packed));
42struct nftl_uci2 {
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 __u16 FoldMark;
45 __u16 FoldMark1;
46 __u32 unused;
Ben Cheng655a7c02013-10-16 16:09:24 -070047} __attribute__((packed));
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49union nftl_uci {
Tao Baod7db5942015-01-28 10:07:51 -080050 struct nftl_uci0 a;
51 struct nftl_uci1 b;
52 struct nftl_uci2 c;
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54};
55struct nftl_oob {
Tao Baod7db5942015-01-28 10:07:51 -080056 struct nftl_bci b;
57 union nftl_uci u;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59};
60struct NFTLMediaHeader {
Tao Baod7db5942015-01-28 10:07:51 -080061 char DataOrgID[6];
62 __u16 NumEraseUnits;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 __u16 FirstPhysicalEUN;
65 __u32 FormattedSize;
66 unsigned char UnitSizeFactor;
Ben Cheng655a7c02013-10-16 16:09:24 -070067} __attribute__((packed));
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define MAX_ERASE_ZONES (8192 - 512)
70#define ERASE_MARK 0x3c69
71#define SECTOR_FREE 0xff
72#define SECTOR_USED 0x55
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define SECTOR_IGNORE 0x11
75#define SECTOR_DELETED 0x00
76#define FOLD_MARK_IN_PROGRESS 0x5555
77#define ZONE_GOOD 0xff
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define ZONE_BAD_ORIGINAL 0
80#define ZONE_BAD_MARKED 7
81#endif