diff options
Diffstat (limited to 'include/mtd/mtd-abi.h')
-rw-r--r-- | include/mtd/mtd-abi.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index 4debb4514634..2f7d45bcbd24 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -52,6 +52,7 @@ struct mtd_oob_buf64 { | |||
52 | #define MTD_NANDFLASH 4 | 52 | #define MTD_NANDFLASH 4 |
53 | #define MTD_DATAFLASH 6 | 53 | #define MTD_DATAFLASH 6 |
54 | #define MTD_UBIVOLUME 7 | 54 | #define MTD_UBIVOLUME 7 |
55 | #define MTD_MLCNANDFLASH 8 | ||
55 | 56 | ||
56 | #define MTD_WRITEABLE 0x400 /* Device is writeable */ | 57 | #define MTD_WRITEABLE 0x400 /* Device is writeable */ |
57 | #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ | 58 | #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ |
@@ -119,7 +120,7 @@ struct otp_info { | |||
119 | #define OTPGETREGIONCOUNT _IOW('M', 14, int) | 120 | #define OTPGETREGIONCOUNT _IOW('M', 14, int) |
120 | #define OTPGETREGIONINFO _IOW('M', 15, struct otp_info) | 121 | #define OTPGETREGIONINFO _IOW('M', 15, struct otp_info) |
121 | #define OTPLOCK _IOR('M', 16, struct otp_info) | 122 | #define OTPLOCK _IOR('M', 16, struct otp_info) |
122 | #define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout) | 123 | #define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout_user) |
123 | #define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats) | 124 | #define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats) |
124 | #define MTDFILEMODE _IO('M', 19) | 125 | #define MTDFILEMODE _IO('M', 19) |
125 | #define MEMERASE64 _IOW('M', 20, struct erase_info_user64) | 126 | #define MEMERASE64 _IOW('M', 20, struct erase_info_user64) |
@@ -144,13 +145,18 @@ struct nand_oobfree { | |||
144 | }; | 145 | }; |
145 | 146 | ||
146 | #define MTD_MAX_OOBFREE_ENTRIES 8 | 147 | #define MTD_MAX_OOBFREE_ENTRIES 8 |
148 | #define MTD_MAX_ECCPOS_ENTRIES 64 | ||
147 | /* | 149 | /* |
148 | * ECC layout control structure. Exported to userspace for | 150 | * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl |
149 | * diagnosis and to allow creation of raw images | 151 | * ECCGETLAYOUT for backwards compatbility and should not be mistaken as a |
152 | * complete set of ECC information. The ioctl truncates the larger internal | ||
153 | * structure to retain binary compatibility with the static declaration of the | ||
154 | * ioctl. Note that the "MTD_MAX_..._ENTRIES" macros represent the max size of | ||
155 | * the user struct, not the MAX size of the internal struct nand_ecclayout. | ||
150 | */ | 156 | */ |
151 | struct nand_ecclayout { | 157 | struct nand_ecclayout_user { |
152 | __u32 eccbytes; | 158 | __u32 eccbytes; |
153 | __u32 eccpos[64]; | 159 | __u32 eccpos[MTD_MAX_ECCPOS_ENTRIES]; |
154 | __u32 oobavail; | 160 | __u32 oobavail; |
155 | struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES]; | 161 | struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES]; |
156 | }; | 162 | }; |