2 * inftl.h -- defines to support the Inverse NAND Flash Translation Layer
4 * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
6 * $Id: inftl.h,v 1.6 2004/06/30 14:49:00 dbrown Exp $
9 #ifndef __MTD_INFTL_H__
10 #define __MTD_INFTL_H__
13 #error This is a kernel header. Perhaps include nftl-user.h instead?
16 #include <linux/mtd/blktrans.h>
17 #include <linux/mtd/mtd.h>
18 #include <linux/mtd/nftl.h>
20 #include <mtd/inftl-user.h>
23 #define INFTL_MAJOR 94
25 #define INFTL_PARTN_BITS 4
30 struct mtd_blktrans_dev mbd
;
33 struct INFTLMediaHeader MediaHdr
;
36 unsigned char sectors
;
37 unsigned short cylinders
;
42 __u16 LastFreeEUN
; /* To speed up finding a free EUN */
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
;
52 int INFTL_mount(struct INFTLrecord
*s
);
53 int INFTL_formatblock(struct INFTLrecord
*s
, int block
);
55 #endif /* __KERNEL__ */
57 #endif /* __MTD_INFTL_H__ */