nftl-user.h
01:
02: <dwmw2@infradead.org>
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20: #ifndef __MTD_NFTL_USER_H__
21: #define __MTD_NFTL_USER_H__
22:
23: #include <linux/types.h>
24:
25:
26:
27: struct nftl_bci {
28: unsigned char ECCSig[6];
29: __u8 Status;
30: __u8 Status1;
31: }__attribute__((packed));
32:
33:
34:
35: struct nftl_uci0 {
36: __u16 VirtUnitNum;
37: __u16 ReplUnitNum;
38: __u16 SpareVirtUnitNum;
39: __u16 SpareReplUnitNum;
40: } __attribute__((packed));
41:
42: struct nftl_uci1 {
43: __u32 WearInfo;
44: __u16 EraseMark;
45: __u16 EraseMark1;
46: } __attribute__((packed));
47:
48: struct nftl_uci2 {
49: __u16 FoldMark;
50: __u16 FoldMark1;
51: __u32 unused;
52: } __attribute__((packed));
53:
54: union nftl_uci {
55: struct nftl_uci0 a;
56: struct nftl_uci1 b;
57: struct nftl_uci2 c;
58: };
59:
60: struct nftl_oob {
61: struct nftl_bci b;
62: union nftl_uci u;
63: };
64:
65:
66:
67: struct NFTLMediaHeader {
68: char DataOrgID[6];
69: __u16 NumEraseUnits;
70: __u16 FirstPhysicalEUN;
71: __u32 FormattedSize;
72: unsigned char UnitSizeFactor;
73: } __attribute__((packed));
74:
75: #define MAX_ERASE_ZONES (8192 - 512)
76:
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
82:
83: #define FOLD_MARK_IN_PROGRESS 0x5555
84:
85: #define ZONE_GOOD 0xff
86: #define ZONE_BAD_ORIGINAL 0
87: #define ZONE_BAD_MARKED 7
88:
89:
90: #endif
91:
© Andrew Scott 2006 -
2025,
All Rights Reserved