aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nftl.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/mtd/nftl.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/mtd/nftl.h')
-rw-r--r--include/linux/mtd/nftl.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h
new file mode 100644
index 000000000000..d35d2c21ff3e
--- /dev/null
+++ b/include/linux/mtd/nftl.h
@@ -0,0 +1,54 @@
1/*
2 * $Id: nftl.h,v 1.16 2004/06/30 14:49:00 dbrown Exp $
3 *
4 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
5 */
6
7#ifndef __MTD_NFTL_H__
8#define __MTD_NFTL_H__
9
10#include <linux/mtd/mtd.h>
11#include <linux/mtd/blktrans.h>
12
13#include <mtd/nftl-user.h>
14
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 */
20
21struct NFTLrecord {
22 struct mtd_blktrans_dev mbd;
23 __u16 MediaUnit, SpareMediaUnit;
24 __u32 EraseSize;
25 struct NFTLMediaHeader MediaHdr;
26 int usecount;
27 unsigned char heads;
28 unsigned char sectors;
29 unsigned short cylinders;
30 __u16 numvunits;
31 __u16 lastEUN; /* should be suppressed */
32 __u16 numfreeEUNs;
33 __u16 LastFreeEUN; /* To speed up finding a free EUN */
34 int head,sect,cyl;
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;
41};
42
43int NFTL_mount(struct NFTLrecord *s);
44int NFTL_formatblock(struct NFTLrecord *s, int block);
45
46#ifndef NFTL_MAJOR
47#define NFTL_MAJOR 93
48#endif
49
50#define MAX_NFTLS 16
51#define MAX_SECTORS_PER_UNIT 64
52#define NFTL_PARTN_BITS 4
53
54#endif /* __MTD_NFTL_H__ */