0001
0002
0003
0004
0005
0006
0007 #ifndef __MTD_INFTL_USER_H__
0008 #define __MTD_INFTL_USER_H__
0009
0010 #include <linux/types.h>
0011
0012 #define OSAK_VERSION 0x5120
0013 #define PERCENTUSED 98
0014
0015 #define SECTORSIZE 512
0016
0017
0018
0019 struct inftl_bci {
0020 __u8 ECCsig[6];
0021 __u8 Status;
0022 __u8 Status1;
0023 } __attribute__((packed));
0024
0025 struct inftl_unithead1 {
0026 __u16 virtualUnitNo;
0027 __u16 prevUnitNo;
0028 __u8 ANAC;
0029 __u8 NACs;
0030 __u8 parityPerField;
0031 __u8 discarded;
0032 } __attribute__((packed));
0033
0034 struct inftl_unithead2 {
0035 __u8 parityPerField;
0036 __u8 ANAC;
0037 __u16 prevUnitNo;
0038 __u16 virtualUnitNo;
0039 __u8 NACs;
0040 __u8 discarded;
0041 } __attribute__((packed));
0042
0043 struct inftl_unittail {
0044 __u8 Reserved[4];
0045 __u16 EraseMark;
0046 __u16 EraseMark1;
0047 } __attribute__((packed));
0048
0049 union inftl_uci {
0050 struct inftl_unithead1 a;
0051 struct inftl_unithead2 b;
0052 struct inftl_unittail c;
0053 };
0054
0055 struct inftl_oob {
0056 struct inftl_bci b;
0057 union inftl_uci u;
0058 };
0059
0060
0061
0062
0063 struct INFTLPartition {
0064 __u32 virtualUnits;
0065 __u32 firstUnit;
0066 __u32 lastUnit;
0067 __u32 flags;
0068 __u32 spareUnits;
0069 __u32 Reserved0;
0070 __u32 Reserved1;
0071 } __attribute__((packed));
0072
0073 struct INFTLMediaHeader {
0074 char bootRecordID[8];
0075 __u32 NoOfBootImageBlocks;
0076 __u32 NoOfBinaryPartitions;
0077 __u32 NoOfBDTLPartitions;
0078 __u32 BlockMultiplierBits;
0079 __u32 FormatFlags;
0080 __u32 OsakVersion;
0081 __u32 PercentUsed;
0082 struct INFTLPartition Partitions[4];
0083 } __attribute__((packed));
0084
0085
0086 #define INFTL_BINARY 0x20000000
0087 #define INFTL_BDTL 0x40000000
0088 #define INFTL_LAST 0x80000000
0089
0090 #endif
0091
0092