Home | History | Annotate | Download | only in mtd
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef __MTD_INFTL_USER_H__
     20 #define __MTD_INFTL_USER_H__
     21 #include <linux/types.h>
     22 #define OSAK_VERSION 0x5120
     23 #define PERCENTUSED 98
     24 #define SECTORSIZE 512
     25 struct inftl_bci {
     26   __u8 ECCsig[6];
     27   __u8 Status;
     28   __u8 Status1;
     29 } __attribute__((packed));
     30 struct inftl_unithead1 {
     31   __u16 virtualUnitNo;
     32   __u16 prevUnitNo;
     33   __u8 ANAC;
     34   __u8 NACs;
     35   __u8 parityPerField;
     36   __u8 discarded;
     37 } __attribute__((packed));
     38 struct inftl_unithead2 {
     39   __u8 parityPerField;
     40   __u8 ANAC;
     41   __u16 prevUnitNo;
     42   __u16 virtualUnitNo;
     43   __u8 NACs;
     44   __u8 discarded;
     45 } __attribute__((packed));
     46 struct inftl_unittail {
     47   __u8 Reserved[4];
     48   __u16 EraseMark;
     49   __u16 EraseMark1;
     50 } __attribute__((packed));
     51 union inftl_uci {
     52   struct inftl_unithead1 a;
     53   struct inftl_unithead2 b;
     54   struct inftl_unittail c;
     55 };
     56 struct inftl_oob {
     57   struct inftl_bci b;
     58   union inftl_uci u;
     59 };
     60 struct INFTLPartition {
     61   __u32 virtualUnits;
     62   __u32 firstUnit;
     63   __u32 lastUnit;
     64   __u32 flags;
     65   __u32 spareUnits;
     66   __u32 Reserved0;
     67   __u32 Reserved1;
     68 } __attribute__((packed));
     69 struct INFTLMediaHeader {
     70   char bootRecordID[8];
     71   __u32 NoOfBootImageBlocks;
     72   __u32 NoOfBinaryPartitions;
     73   __u32 NoOfBDTLPartitions;
     74   __u32 BlockMultiplierBits;
     75   __u32 FormatFlags;
     76   __u32 OsakVersion;
     77   __u32 PercentUsed;
     78   struct INFTLPartition Partitions[4];
     79 } __attribute__((packed));
     80 #define INFTL_BINARY 0x20000000
     81 #define INFTL_BDTL 0x40000000
     82 #define INFTL_LAST 0x80000000
     83 #endif
     84