2 * $Id: nftl.h,v 1.16 2004/06/30 14:49:00 dbrown Exp $
4 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
10 #include <linux/mtd/mtd.h>
11 #include <linux/mtd/blktrans.h>
13 #include <mtd/nftl-user.h>
15 /* these info are used in ReplUnitTable */
16 #define BLOCK_NIL 0xffff /* last block of a chain */
17 #define BLOCK_FREE 0xfffe /* free block */
18 #define BLOCK_NOTEXPLORED 0xfffd /* non explored block, only used during mounting */
19 #define BLOCK_RESERVED 0xfffc /* bios block or bad block */
22 struct mtd_blktrans_dev mbd;
23 __u16 MediaUnit, SpareMediaUnit;
25 struct NFTLMediaHeader MediaHdr;
28 unsigned char sectors;
29 unsigned short cylinders;
31 __u16 lastEUN; /* should be suppressed */
33 __u16 LastFreeEUN; /* To speed up finding a free EUN */
35 __u16 *EUNtable; /* [numvunits]: First EUN for each virtual unit */
36 __u16 *ReplUnitTable; /* [numEUNs]: ReplUnitNumber for each */
37 unsigned int nb_blocks; /* number of physical blocks */
38 unsigned int nb_boot_blocks; /* number of blocks used by the bios */
39 struct erase_info instr;
40 struct nand_oobinfo oobinfo;
43 int NFTL_mount(struct NFTLrecord *s);
44 int NFTL_formatblock(struct NFTLrecord *s, int block);
51 #define MAX_SECTORS_PER_UNIT 64
52 #define NFTL_PARTN_BITS 4
54 #endif /* __MTD_NFTL_H__ */