blob: da7320e280092217456283729657b04c75746622 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <linux/mtd/mtd.h>
16#include <linux/mtd/blktrans.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080017
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080018#include <mtd/nftl-user.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080019
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080020#define BLOCK_NIL 0xffff
21#define BLOCK_FREE 0xfffe
22#define BLOCK_NOTEXPLORED 0xfffd
23#define BLOCK_RESERVED 0xfffc
Ben Cheng4b29af02012-03-07 16:14:53 -080024
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025struct 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 Cheng4b29af02012-03-07 16:14:53 -080046
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080047#ifndef NFTL_MAJOR
48#define NFTL_MAJOR 93
49#endif
Ben Cheng4b29af02012-03-07 16:14:53 -080050
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080051#define MAX_NFTLS 16
52#define MAX_SECTORS_PER_UNIT 64
53#define NFTL_PARTN_BITS 4
Ben Cheng4b29af02012-03-07 16:14:53 -080054
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080055#endif