• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
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>
22 struct nftl_bci {
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24   unsigned char ECCSig[6];
25   __u8 Status;
26   __u8 Status1;
27 } __attribute__((packed));
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 struct nftl_uci0 {
30   __u16 VirtUnitNum;
31   __u16 ReplUnitNum;
32   __u16 SpareVirtUnitNum;
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34   __u16 SpareReplUnitNum;
35 } __attribute__((packed));
36 struct nftl_uci1 {
37   __u32 WearInfo;
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39   __u16 EraseMark;
40   __u16 EraseMark1;
41 } __attribute__((packed));
42 struct nftl_uci2 {
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44   __u16 FoldMark;
45   __u16 FoldMark1;
46   __u32 unused;
47 } __attribute__((packed));
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 union nftl_uci {
50   struct nftl_uci0 a;
51   struct nftl_uci1 b;
52   struct nftl_uci2 c;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 };
55 struct nftl_oob {
56   struct nftl_bci b;
57   union nftl_uci u;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 };
60 struct NFTLMediaHeader {
61   char DataOrgID[6];
62   __u16 NumEraseUnits;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   __u16 FirstPhysicalEUN;
65   __u32 FormattedSize;
66   unsigned char UnitSizeFactor;
67 } __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
82