xref: /aosp_15_r20/bionic/libc/kernel/uapi/mtd/inftl-user.h (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __MTD_INFTL_USER_H__
8 #define __MTD_INFTL_USER_H__
9 #include <linux/types.h>
10 #define OSAK_VERSION 0x5120
11 #define PERCENTUSED 98
12 #define SECTORSIZE 512
13 struct inftl_bci {
14   __u8 ECCsig[6];
15   __u8 Status;
16   __u8 Status1;
17 } __attribute__((packed));
18 struct inftl_unithead1 {
19   __u16 virtualUnitNo;
20   __u16 prevUnitNo;
21   __u8 ANAC;
22   __u8 NACs;
23   __u8 parityPerField;
24   __u8 discarded;
25 } __attribute__((packed));
26 struct inftl_unithead2 {
27   __u8 parityPerField;
28   __u8 ANAC;
29   __u16 prevUnitNo;
30   __u16 virtualUnitNo;
31   __u8 NACs;
32   __u8 discarded;
33 } __attribute__((packed));
34 struct inftl_unittail {
35   __u8 Reserved[4];
36   __u16 EraseMark;
37   __u16 EraseMark1;
38 } __attribute__((packed));
39 union inftl_uci {
40   struct inftl_unithead1 a;
41   struct inftl_unithead2 b;
42   struct inftl_unittail c;
43 };
44 struct inftl_oob {
45   struct inftl_bci b;
46   union inftl_uci u;
47 };
48 struct INFTLPartition {
49   __u32 virtualUnits;
50   __u32 firstUnit;
51   __u32 lastUnit;
52   __u32 flags;
53   __u32 spareUnits;
54   __u32 Reserved0;
55   __u32 Reserved1;
56 } __attribute__((packed));
57 struct INFTLMediaHeader {
58   char bootRecordID[8];
59   __u32 NoOfBootImageBlocks;
60   __u32 NoOfBinaryPartitions;
61   __u32 NoOfBDTLPartitions;
62   __u32 BlockMultiplierBits;
63   __u32 FormatFlags;
64   __u32 OsakVersion;
65   __u32 PercentUsed;
66   struct INFTLPartition Partitions[4];
67 } __attribute__((packed));
68 #define INFTL_BINARY 0x20000000
69 #define INFTL_BDTL 0x40000000
70 #define INFTL_LAST 0x80000000
71 #endif
72