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_INFTL_USER_H__ 7#define __MTD_INFTL_USER_H__ 8#include <linux/types.h> 9#define OSAK_VERSION 0x5120 10#define PERCENTUSED 98 11#define SECTORSIZE 512 12struct inftl_bci { 13 __u8 ECCsig[6]; 14 __u8 Status; 15 __u8 Status1; 16} __attribute__((packed)); 17struct inftl_unithead1 { 18 __u16 virtualUnitNo; 19 __u16 prevUnitNo; 20 __u8 ANAC; 21 __u8 NACs; 22 __u8 parityPerField; 23 __u8 discarded; 24} __attribute__((packed)); 25struct inftl_unithead2 { 26 __u8 parityPerField; 27 __u8 ANAC; 28 __u16 prevUnitNo; 29 __u16 virtualUnitNo; 30 __u8 NACs; 31 __u8 discarded; 32} __attribute__((packed)); 33struct inftl_unittail { 34 __u8 Reserved[4]; 35 __u16 EraseMark; 36 __u16 EraseMark1; 37} __attribute__((packed)); 38union inftl_uci { 39 struct inftl_unithead1 a; 40 struct inftl_unithead2 b; 41 struct inftl_unittail c; 42}; 43struct inftl_oob { 44 struct inftl_bci b; 45 union inftl_uci u; 46}; 47struct INFTLPartition { 48 __u32 virtualUnits; 49 __u32 firstUnit; 50 __u32 lastUnit; 51 __u32 flags; 52 __u32 spareUnits; 53 __u32 Reserved0; 54 __u32 Reserved1; 55} __attribute__((packed)); 56struct INFTLMediaHeader { 57 char bootRecordID[8]; 58 __u32 NoOfBootImageBlocks; 59 __u32 NoOfBinaryPartitions; 60 __u32 NoOfBDTLPartitions; 61 __u32 BlockMultiplierBits; 62 __u32 FormatFlags; 63 __u32 OsakVersion; 64 __u32 PercentUsed; 65 struct INFTLPartition Partitions[4]; 66} __attribute__((packed)); 67#define INFTL_BINARY 0x20000000 68#define INFTL_BDTL 0x40000000 69#define INFTL_LAST 0x80000000 70#endif 71