aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/inftl.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/inftl.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/inftl.h')
-rw-r--r--include/linux/mtd/inftl.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h
new file mode 100644
index 000000000000..b52c8cbd235c
--- /dev/null
+++ b/include/linux/mtd/inftl.h
@@ -0,0 +1,57 @@
1/*
2 * inftl.h -- defines to support the Inverse NAND Flash Translation Layer
3 *
4 * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
5 *
6 * $Id: inftl.h,v 1.6 2004/06/30 14:49:00 dbrown Exp $
7 */
8
9#ifndef __MTD_INFTL_H__
10#define __MTD_INFTL_H__
11
12#ifndef __KERNEL__
13#error This is a kernel header. Perhaps include nftl-user.h instead?
14#endif
15
16#include <linux/mtd/blktrans.h>
17#include <linux/mtd/mtd.h>
18#include <linux/mtd/nftl.h>
19
20#include <mtd/inftl-user.h>
21
22#ifndef INFTL_MAJOR
23#define INFTL_MAJOR 94
24#endif
25#define INFTL_PARTN_BITS 4
26
27#ifdef __KERNEL__
28
29struct INFTLrecord {
30 struct mtd_blktrans_dev mbd;
31 __u16 MediaUnit;
32 __u32 EraseSize;
33 struct INFTLMediaHeader MediaHdr;
34 int usecount;
35 unsigned char heads;
36 unsigned char sectors;
37 unsigned short cylinders;
38 __u16 numvunits;
39 __u16 firstEUN;
40 __u16 lastEUN;
41 __u16 numfreeEUNs;
42 __u16 LastFreeEUN; /* To speed up finding a free EUN */
43 int head,sect,cyl;
44 __u16 *PUtable; /* Physical Unit Table */
45 __u16 *VUtable; /* Virtual Unit Table */
46 unsigned int nb_blocks; /* number of physical blocks */
47 unsigned int nb_boot_blocks; /* number of blocks used by the bios */
48 struct erase_info instr;
49 struct nand_oobinfo oobinfo;
50};
51
52int INFTL_mount(struct INFTLrecord *s);
53int INFTL_formatblock(struct INFTLrecord *s, int block);
54
55#endif /* __KERNEL__ */
56
57#endif /* __MTD_INFTL_H__ */