122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef __MTD_INFTL_USER_H__
2022851890Sopenharmony_ci#define __MTD_INFTL_USER_H__
2122851890Sopenharmony_ci#include <linux/types.h>
2222851890Sopenharmony_ci#define OSAK_VERSION 0x5120
2322851890Sopenharmony_ci#define PERCENTUSED 98
2422851890Sopenharmony_ci#define SECTORSIZE 512
2522851890Sopenharmony_cistruct inftl_bci {
2622851890Sopenharmony_ci  __u8 ECCsig[6];
2722851890Sopenharmony_ci  __u8 Status;
2822851890Sopenharmony_ci  __u8 Status1;
2922851890Sopenharmony_ci} __attribute__((packed));
3022851890Sopenharmony_cistruct inftl_unithead1 {
3122851890Sopenharmony_ci  __u16 virtualUnitNo;
3222851890Sopenharmony_ci  __u16 prevUnitNo;
3322851890Sopenharmony_ci  __u8 ANAC;
3422851890Sopenharmony_ci  __u8 NACs;
3522851890Sopenharmony_ci  __u8 parityPerField;
3622851890Sopenharmony_ci  __u8 discarded;
3722851890Sopenharmony_ci} __attribute__((packed));
3822851890Sopenharmony_cistruct inftl_unithead2 {
3922851890Sopenharmony_ci  __u8 parityPerField;
4022851890Sopenharmony_ci  __u8 ANAC;
4122851890Sopenharmony_ci  __u16 prevUnitNo;
4222851890Sopenharmony_ci  __u16 virtualUnitNo;
4322851890Sopenharmony_ci  __u8 NACs;
4422851890Sopenharmony_ci  __u8 discarded;
4522851890Sopenharmony_ci} __attribute__((packed));
4622851890Sopenharmony_cistruct inftl_unittail {
4722851890Sopenharmony_ci  __u8 Reserved[4];
4822851890Sopenharmony_ci  __u16 EraseMark;
4922851890Sopenharmony_ci  __u16 EraseMark1;
5022851890Sopenharmony_ci} __attribute__((packed));
5122851890Sopenharmony_ciunion inftl_uci {
5222851890Sopenharmony_ci  struct inftl_unithead1 a;
5322851890Sopenharmony_ci  struct inftl_unithead2 b;
5422851890Sopenharmony_ci  struct inftl_unittail c;
5522851890Sopenharmony_ci};
5622851890Sopenharmony_cistruct inftl_oob {
5722851890Sopenharmony_ci  struct inftl_bci b;
5822851890Sopenharmony_ci  union inftl_uci u;
5922851890Sopenharmony_ci};
6022851890Sopenharmony_cistruct INFTLPartition {
6122851890Sopenharmony_ci  __u32 virtualUnits;
6222851890Sopenharmony_ci  __u32 firstUnit;
6322851890Sopenharmony_ci  __u32 lastUnit;
6422851890Sopenharmony_ci  __u32 flags;
6522851890Sopenharmony_ci  __u32 spareUnits;
6622851890Sopenharmony_ci  __u32 Reserved0;
6722851890Sopenharmony_ci  __u32 Reserved1;
6822851890Sopenharmony_ci} __attribute__((packed));
6922851890Sopenharmony_cistruct INFTLMediaHeader {
7022851890Sopenharmony_ci  char bootRecordID[8];
7122851890Sopenharmony_ci  __u32 NoOfBootImageBlocks;
7222851890Sopenharmony_ci  __u32 NoOfBinaryPartitions;
7322851890Sopenharmony_ci  __u32 NoOfBDTLPartitions;
7422851890Sopenharmony_ci  __u32 BlockMultiplierBits;
7522851890Sopenharmony_ci  __u32 FormatFlags;
7622851890Sopenharmony_ci  __u32 OsakVersion;
7722851890Sopenharmony_ci  __u32 PercentUsed;
7822851890Sopenharmony_ci  struct INFTLPartition Partitions[4];
7922851890Sopenharmony_ci} __attribute__((packed));
8022851890Sopenharmony_ci#define INFTL_BINARY 0x20000000
8122851890Sopenharmony_ci#define INFTL_BDTL 0x40000000
8222851890Sopenharmony_ci#define INFTL_LAST 0x80000000
8322851890Sopenharmony_ci#endif
84