[ARM] S3C: Fix scaler1 clock rate information
[linux-2.6/openmoko-kernel.git] / include / mtd / nftl-user.h
blob390d21c080aa98108d4cfef8bc5f10c2a1e84a0e
1 /*
2 * Parts of NFTL headers shared with userspace
4 */
6 #ifndef __MTD_NFTL_USER_H__
7 #define __MTD_NFTL_USER_H__
9 /* Block Control Information */
11 struct nftl_bci {
12 unsigned char ECCSig[6];
13 uint8_t Status;
14 uint8_t Status1;
15 }__attribute__((packed));
17 /* Unit Control Information */
19 struct nftl_uci0 {
20 uint16_t VirtUnitNum;
21 uint16_t ReplUnitNum;
22 uint16_t SpareVirtUnitNum;
23 uint16_t SpareReplUnitNum;
24 } __attribute__((packed));
26 struct nftl_uci1 {
27 uint32_t WearInfo;
28 uint16_t EraseMark;
29 uint16_t EraseMark1;
30 } __attribute__((packed));
32 struct nftl_uci2 {
33 uint16_t FoldMark;
34 uint16_t FoldMark1;
35 uint32_t unused;
36 } __attribute__((packed));
38 union nftl_uci {
39 struct nftl_uci0 a;
40 struct nftl_uci1 b;
41 struct nftl_uci2 c;
44 struct nftl_oob {
45 struct nftl_bci b;
46 union nftl_uci u;
49 /* NFTL Media Header */
51 struct NFTLMediaHeader {
52 char DataOrgID[6];
53 uint16_t NumEraseUnits;
54 uint16_t FirstPhysicalEUN;
55 uint32_t FormattedSize;
56 unsigned char UnitSizeFactor;
57 } __attribute__((packed));
59 #define MAX_ERASE_ZONES (8192 - 512)
61 #define ERASE_MARK 0x3c69
62 #define SECTOR_FREE 0xff
63 #define SECTOR_USED 0x55
64 #define SECTOR_IGNORE 0x11
65 #define SECTOR_DELETED 0x00
67 #define FOLD_MARK_IN_PROGRESS 0x5555
69 #define ZONE_GOOD 0xff
70 #define ZONE_BAD_ORIGINAL 0
71 #define ZONE_BAD_MARKED 7
74 #endif /* __MTD_NFTL_USER_H__ */