nftl.h revision 7012117d4ae7e9ca9e50812f55757411aa8f93a0
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__
14
15#include <linux/mtd/mtd.h>
16#include <linux/mtd/blktrans.h>
17
18#include <mtd/nftl-user.h>
19
20#define BLOCK_NIL 0xffff
21#define BLOCK_FREE 0xfffe
22#define BLOCK_NOTEXPLORED 0xfffd
23#define BLOCK_RESERVED 0xfffc
24
25struct 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};
46
47#ifndef NFTL_MAJOR
48#define NFTL_MAJOR 93
49#endif
50
51#define MAX_NFTLS 16
52#define MAX_SECTORS_PER_UNIT 64
53#define NFTL_PARTN_BITS 4
54
55#endif
56