]> www.infradead.org Git - mtd-utils.git/commitdiff
Update user headers from latest kernel tree
authorJosh Boyer <jwboyer@gmail.com>
Mon, 29 May 2006 13:41:35 +0000 (08:41 -0500)
committerJosh Boyer <jwboyer@gmail.com>
Mon, 29 May 2006 13:41:35 +0000 (08:41 -0500)
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
include/mtd/mtd-abi.h
include/mtd/mtd-user.h

index 1e09e4c8f485bf6b0064b6e56a58328f28182976..54c673f9648d41d5926bd53d94f6c57713203c0a 100644 (file)
@@ -82,12 +82,12 @@ struct otp_info {
        uint32_t locked;
 };
 
-#define MEMGETINFO              _IOR('M', 1, struct mtd_info_user)
-#define MEMERASE                _IOW('M', 2, struct erase_info_user)
-#define MEMWRITEOOB             _IOWR('M', 3, struct mtd_oob_buf)
-#define MEMREADOOB              _IOWR('M', 4, struct mtd_oob_buf)
-#define MEMLOCK                 _IOW('M', 5, struct erase_info_user)
-#define MEMUNLOCK               _IOW('M', 6, struct erase_info_user)
+#define MEMGETINFO             _IOR('M', 1, struct mtd_info_user)
+#define MEMERASE               _IOW('M', 2, struct erase_info_user)
+#define MEMWRITEOOB            _IOWR('M', 3, struct mtd_oob_buf)
+#define MEMREADOOB             _IOWR('M', 4, struct mtd_oob_buf)
+#define MEMLOCK                        _IOW('M', 5, struct erase_info_user)
+#define MEMUNLOCK              _IOW('M', 6, struct erase_info_user)
 #define MEMGETREGIONCOUNT      _IOR('M', 7, int)
 #define MEMGETREGIONINFO       _IOWR('M', 8, struct region_info_user)
 #define MEMSETOOBSEL           _IOW('M', 9, struct nand_oobinfo)
@@ -97,8 +97,13 @@ struct otp_info {
 #define OTPSELECT              _IOR('M', 13, int)
 #define OTPGETREGIONCOUNT      _IOW('M', 14, int)
 #define OTPGETREGIONINFO       _IOW('M', 15, struct otp_info)
-#define OTPLOCK                _IOR('M', 16, struct otp_info)
+#define OTPLOCK                        _IOR('M', 16, struct otp_info)
+#define ECCGETLAYOUT           _IOR('M', 17, struct nand_ecclayout)
 
+/*
+ * Obsolete legacy interface. Keep it in order not to break userspace
+ * interfaces
+ */
 struct nand_oobinfo {
        uint32_t useecc;
        uint32_t eccbytes;
@@ -106,4 +111,21 @@ struct nand_oobinfo {
        uint32_t eccpos[32];
 };
 
+struct nand_oobfree {
+       uint32_t offset;
+       uint32_t length;
+};
+
+#define MTD_MAX_OOBFREE_ENTRIES        8
+/*
+ * ECC layout control structure. Exported to userspace for
+ * diagnosis and to allow creation of raw images
+ */
+struct nand_ecclayout {
+       uint32_t eccbytes;
+       uint32_t eccpos[64];
+       uint32_t oobavail;
+       struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
+};
+
 #endif /* __MTD_ABI_H__ */
index 1c13fc7161fefaa084ecb9f66f63156c2154e94a..713f34d3e62e184aa6712ee53ac8308412d26593 100644 (file)
@@ -16,5 +16,6 @@ typedef struct mtd_info_user mtd_info_t;
 typedef struct erase_info_user erase_info_t;
 typedef struct region_info_user region_info_t;
 typedef struct nand_oobinfo nand_oobinfo_t;
+typedef struct nand_ecclayout nand_ecclayout_t;
 
 #endif /* __MTD_USER_H__ */