2 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef __MTD_NFTL_USER_H__
21 #define __MTD_NFTL_USER_H__
23 #include <linux/types.h>
25 /* Block Control Information */
28 unsigned char ECCSig[6];
31 }__attribute__((packed));
33 /* Unit Control Information */
38 __u16 SpareVirtUnitNum;
39 __u16 SpareReplUnitNum;
40 } __attribute__((packed));
46 } __attribute__((packed));
52 } __attribute__((packed));
65 /* NFTL Media Header */
67 struct NFTLMediaHeader {
70 __u16 FirstPhysicalEUN;
72 unsigned char UnitSizeFactor;
73 } __attribute__((packed));
75 #define MAX_ERASE_ZONES (8192 - 512)
77 #define ERASE_MARK 0x3c69
78 #define SECTOR_FREE 0xff
79 #define SECTOR_USED 0x55
80 #define SECTOR_IGNORE 0x11
81 #define SECTOR_DELETED 0x00
83 #define FOLD_MARK_IN_PROGRESS 0x5555
85 #define ZONE_GOOD 0xff
86 #define ZONE_BAD_ORIGINAL 0
87 #define ZONE_BAD_MARKED 7
90 #endif /* __MTD_NFTL_USER_H__ */