122851890Sopenharmony_ci/* 222851890Sopenharmony_ci * This header was generated from the Linux kernel headers by update_headers.py, 322851890Sopenharmony_ci * to provide necessary information from kernel to userspace, such as constants, 422851890Sopenharmony_ci * structures, and macros, and thus, contains no copyrightable information. 522851890Sopenharmony_ci */ 622851890Sopenharmony_ci#ifndef __MTD_INFTL_USER_H__ 722851890Sopenharmony_ci#define __MTD_INFTL_USER_H__ 822851890Sopenharmony_ci#include <linux/types.h> 922851890Sopenharmony_ci#define OSAK_VERSION 0x5120 1022851890Sopenharmony_ci#define PERCENTUSED 98 1122851890Sopenharmony_ci#define SECTORSIZE 512 1222851890Sopenharmony_cistruct inftl_bci { 1322851890Sopenharmony_ci __u8 ECCsig[6]; 1422851890Sopenharmony_ci __u8 Status; 1522851890Sopenharmony_ci __u8 Status1; 1622851890Sopenharmony_ci} __attribute__((packed)); 1722851890Sopenharmony_cistruct inftl_unithead1 { 1822851890Sopenharmony_ci __u16 virtualUnitNo; 1922851890Sopenharmony_ci __u16 prevUnitNo; 2022851890Sopenharmony_ci __u8 ANAC; 2122851890Sopenharmony_ci __u8 NACs; 2222851890Sopenharmony_ci __u8 parityPerField; 2322851890Sopenharmony_ci __u8 discarded; 2422851890Sopenharmony_ci} __attribute__((packed)); 2522851890Sopenharmony_cistruct inftl_unithead2 { 2622851890Sopenharmony_ci __u8 parityPerField; 2722851890Sopenharmony_ci __u8 ANAC; 2822851890Sopenharmony_ci __u16 prevUnitNo; 2922851890Sopenharmony_ci __u16 virtualUnitNo; 3022851890Sopenharmony_ci __u8 NACs; 3122851890Sopenharmony_ci __u8 discarded; 3222851890Sopenharmony_ci} __attribute__((packed)); 3322851890Sopenharmony_cistruct inftl_unittail { 3422851890Sopenharmony_ci __u8 Reserved[4]; 3522851890Sopenharmony_ci __u16 EraseMark; 3622851890Sopenharmony_ci __u16 EraseMark1; 3722851890Sopenharmony_ci} __attribute__((packed)); 3822851890Sopenharmony_ciunion inftl_uci { 3922851890Sopenharmony_ci struct inftl_unithead1 a; 4022851890Sopenharmony_ci struct inftl_unithead2 b; 4122851890Sopenharmony_ci struct inftl_unittail c; 4222851890Sopenharmony_ci}; 4322851890Sopenharmony_cistruct inftl_oob { 4422851890Sopenharmony_ci struct inftl_bci b; 4522851890Sopenharmony_ci union inftl_uci u; 4622851890Sopenharmony_ci}; 4722851890Sopenharmony_cistruct INFTLPartition { 4822851890Sopenharmony_ci __u32 virtualUnits; 4922851890Sopenharmony_ci __u32 firstUnit; 5022851890Sopenharmony_ci __u32 lastUnit; 5122851890Sopenharmony_ci __u32 flags; 5222851890Sopenharmony_ci __u32 spareUnits; 5322851890Sopenharmony_ci __u32 Reserved0; 5422851890Sopenharmony_ci __u32 Reserved1; 5522851890Sopenharmony_ci} __attribute__((packed)); 5622851890Sopenharmony_cistruct INFTLMediaHeader { 5722851890Sopenharmony_ci char bootRecordID[8]; 5822851890Sopenharmony_ci __u32 NoOfBootImageBlocks; 5922851890Sopenharmony_ci __u32 NoOfBinaryPartitions; 6022851890Sopenharmony_ci __u32 NoOfBDTLPartitions; 6122851890Sopenharmony_ci __u32 BlockMultiplierBits; 6222851890Sopenharmony_ci __u32 FormatFlags; 6322851890Sopenharmony_ci __u32 OsakVersion; 6422851890Sopenharmony_ci __u32 PercentUsed; 6522851890Sopenharmony_ci struct INFTLPartition Partitions[4]; 6622851890Sopenharmony_ci} __attribute__((packed)); 6722851890Sopenharmony_ci#define INFTL_BINARY 0x20000000 6822851890Sopenharmony_ci#define INFTL_BDTL 0x40000000 6922851890Sopenharmony_ci#define INFTL_LAST 0x80000000 7022851890Sopenharmony_ci#endif 71