The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef __MTD_NFTL_H__ |
| 13 | #define __MTD_NFTL_H__ |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | #include <linux/mtd/mtd.h> |
| 16 | #include <linux/mtd/blktrans.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 17 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 18 | #include <mtd/nftl-user.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 19 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 20 | #define BLOCK_NIL 0xffff |
| 21 | #define BLOCK_FREE 0xfffe |
| 22 | #define BLOCK_NOTEXPLORED 0xfffd |
| 23 | #define BLOCK_RESERVED 0xfffc |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 24 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 25 | struct NFTLrecord { |
| 26 | struct mtd_blktrans_dev mbd; |
| 27 | __u16 MediaUnit, SpareMediaUnit; |
| 28 | __u32 EraseSize; |
| 29 | struct NFTLMediaHeader MediaHdr; |
| 30 | int usecount; |
| 31 | unsigned char heads; |
| 32 | unsigned char sectors; |
| 33 | unsigned short cylinders; |
| 34 | __u16 numvunits; |
| 35 | __u16 lastEUN; |
| 36 | __u16 numfreeEUNs; |
| 37 | __u16 LastFreeEUN; |
| 38 | int head,sect,cyl; |
| 39 | __u16 *EUNtable; |
| 40 | __u16 *ReplUnitTable; |
| 41 | unsigned int nb_blocks; |
| 42 | unsigned int nb_boot_blocks; |
| 43 | struct erase_info instr; |
| 44 | struct nand_ecclayout oobinfo; |
| 45 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 46 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 47 | #ifndef NFTL_MAJOR |
| 48 | #define NFTL_MAJOR 93 |
| 49 | #endif |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 50 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 51 | #define MAX_NFTLS 16 |
| 52 | #define MAX_SECTORS_PER_UNIT 64 |
| 53 | #define NFTL_PARTN_BITS 4 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 54 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 55 | #endif |