uwb: add the UWB stack (debug support)
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / mtd / inftl-user.h
blobe17eda302b2d6c505902d8992f89712f362c9197
1 /*
2 * Parts of INFTL headers shared with userspace
4 */
6 #ifndef __MTD_INFTL_USER_H__
7 #define __MTD_INFTL_USER_H__
9 #define OSAK_VERSION 0x5120
10 #define PERCENTUSED 98
12 #define SECTORSIZE 512
14 /* Block Control Information */
16 struct inftl_bci {
17 uint8_t ECCsig[6];
18 uint8_t Status;
19 uint8_t Status1;
20 } __attribute__((packed));
22 struct inftl_unithead1 {
23 uint16_t virtualUnitNo;
24 uint16_t prevUnitNo;
25 uint8_t ANAC;
26 uint8_t NACs;
27 uint8_t parityPerField;
28 uint8_t discarded;
29 } __attribute__((packed));
31 struct inftl_unithead2 {
32 uint8_t parityPerField;
33 uint8_t ANAC;
34 uint16_t prevUnitNo;
35 uint16_t virtualUnitNo;
36 uint8_t NACs;
37 uint8_t discarded;
38 } __attribute__((packed));
40 struct inftl_unittail {
41 uint8_t Reserved[4];
42 uint16_t EraseMark;
43 uint16_t EraseMark1;
44 } __attribute__((packed));
46 union inftl_uci {
47 struct inftl_unithead1 a;
48 struct inftl_unithead2 b;
49 struct inftl_unittail c;
52 struct inftl_oob {
53 struct inftl_bci b;
54 union inftl_uci u;
58 /* INFTL Media Header */
60 struct INFTLPartition {
61 __u32 virtualUnits;
62 __u32 firstUnit;
63 __u32 lastUnit;
64 __u32 flags;
65 __u32 spareUnits;
66 __u32 Reserved0;
67 __u32 Reserved1;
68 } __attribute__((packed));
70 struct INFTLMediaHeader {
71 char bootRecordID[8];
72 __u32 NoOfBootImageBlocks;
73 __u32 NoOfBinaryPartitions;
74 __u32 NoOfBDTLPartitions;
75 __u32 BlockMultiplierBits;
76 __u32 FormatFlags;
77 __u32 OsakVersion;
78 __u32 PercentUsed;
79 struct INFTLPartition Partitions[4];
80 } __attribute__((packed));
82 /* Partition flag types */
83 #define INFTL_BINARY 0x20000000
84 #define INFTL_BDTL 0x40000000
85 #define INFTL_LAST 0x80000000
87 #endif /* __MTD_INFTL_USER_H__ */