mtd/include/mtd mtd-abi.h,1.8,1.9
Nicolas Pitre
nico at infradead.org
Tue Feb 8 12:45:55 EST 2005
Update of /home/cvs/mtd/include/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv22416/include/mtd
Modified Files:
mtd-abi.h
Log Message:
user interface to Protection Registers
This is implemented using a ioctl to switch the MTD char device into
one of the different OTP "modes", at which point read/write/seek can
operate on the selected OTP area. Also some extra ioctls to query
for size and lock protection segments or groups. Some example user
space utilities are provided.
Signed-off-by: Nicolas Pitre <nico at cam.org>
Index: mtd-abi.h
===================================================================
RCS file: /home/cvs/mtd/include/mtd/mtd-abi.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mtd-abi.h 8 Feb 2005 17:11:16 -0000 1.8
+++ mtd-abi.h 8 Feb 2005 17:45:52 -0000 1.9
@@ -61,6 +61,11 @@
#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read)
+/* OTP mode selection */
+#define MTD_OTP_OFF 0
+#define MTD_OTP_FACTORY 1
+#define MTD_OTP_USER 2
+
struct mtd_info_user {
uint8_t type;
uint32_t flags;
@@ -98,6 +103,10 @@
#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
#define MEMGETBADBLOCK _IOW('M', 11, loff_t)
#define MEMSETBADBLOCK _IOW('M', 12, loff_t)
+#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)
struct nand_oobinfo {
uint32_t useecc;
More information about the linux-mtd-cvs
mailing list