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_NFTL_USER_H__ 2022851890Sopenharmony_ci#define __MTD_NFTL_USER_H__ 2122851890Sopenharmony_ci#include <linux/types.h> 2222851890Sopenharmony_cistruct nftl_bci { 2322851890Sopenharmony_ci unsigned char ECCSig[6]; 2422851890Sopenharmony_ci __u8 Status; 2522851890Sopenharmony_ci __u8 Status1; 2622851890Sopenharmony_ci} __attribute__((packed)); 2722851890Sopenharmony_cistruct nftl_uci0 { 2822851890Sopenharmony_ci __u16 VirtUnitNum; 2922851890Sopenharmony_ci __u16 ReplUnitNum; 3022851890Sopenharmony_ci __u16 SpareVirtUnitNum; 3122851890Sopenharmony_ci __u16 SpareReplUnitNum; 3222851890Sopenharmony_ci} __attribute__((packed)); 3322851890Sopenharmony_cistruct nftl_uci1 { 3422851890Sopenharmony_ci __u32 WearInfo; 3522851890Sopenharmony_ci __u16 EraseMark; 3622851890Sopenharmony_ci __u16 EraseMark1; 3722851890Sopenharmony_ci} __attribute__((packed)); 3822851890Sopenharmony_cistruct nftl_uci2 { 3922851890Sopenharmony_ci __u16 FoldMark; 4022851890Sopenharmony_ci __u16 FoldMark1; 4122851890Sopenharmony_ci __u32 unused; 4222851890Sopenharmony_ci} __attribute__((packed)); 4322851890Sopenharmony_ciunion nftl_uci { 4422851890Sopenharmony_ci struct nftl_uci0 a; 4522851890Sopenharmony_ci struct nftl_uci1 b; 4622851890Sopenharmony_ci struct nftl_uci2 c; 4722851890Sopenharmony_ci}; 4822851890Sopenharmony_cistruct nftl_oob { 4922851890Sopenharmony_ci struct nftl_bci b; 5022851890Sopenharmony_ci union nftl_uci u; 5122851890Sopenharmony_ci}; 5222851890Sopenharmony_cistruct NFTLMediaHeader { 5322851890Sopenharmony_ci char DataOrgID[6]; 5422851890Sopenharmony_ci __u16 NumEraseUnits; 5522851890Sopenharmony_ci __u16 FirstPhysicalEUN; 5622851890Sopenharmony_ci __u32 FormattedSize; 5722851890Sopenharmony_ci unsigned char UnitSizeFactor; 5822851890Sopenharmony_ci} __attribute__((packed)); 5922851890Sopenharmony_ci#define MAX_ERASE_ZONES (8192 - 512) 6022851890Sopenharmony_ci#define ERASE_MARK 0x3c69 6122851890Sopenharmony_ci#define SECTOR_FREE 0xff 6222851890Sopenharmony_ci#define SECTOR_USED 0x55 6322851890Sopenharmony_ci#define SECTOR_IGNORE 0x11 6422851890Sopenharmony_ci#define SECTOR_DELETED 0x00 6522851890Sopenharmony_ci#define FOLD_MARK_IN_PROGRESS 0x5555 6622851890Sopenharmony_ci#define ZONE_GOOD 0xff 6722851890Sopenharmony_ci#define ZONE_BAD_ORIGINAL 0 6822851890Sopenharmony_ci#define ZONE_BAD_MARKED 7 6922851890Sopenharmony_ci#endif 70