diff options
author | Nicolas Pitre <nico@cam.org> | 2005-02-08 12:45:55 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 06:26:04 -0400 |
commit | 31f4233baeaaeb7c563d2766781c6592ad259b6a (patch) | |
tree | 475ffcfcc1fe91a47d6b8c413d8f25b3fdfcc1c0 /include/mtd/mtd-abi.h | |
parent | f77814dd5728edaf1239d19755d2aa0d8c33d861 (diff) |
[MTD] 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@cam.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/mtd/mtd-abi.h')
-rw-r--r-- | include/mtd/mtd-abi.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index 091eb571e993..c984cb2c9413 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: mtd-abi.h,v 1.8 2005/02/08 17:11:16 nico Exp $ | 2 | * $Id: mtd-abi.h,v 1.9 2005/02/08 17:45:52 nico Exp $ |
3 | * | 3 | * |
4 | * Portions of MTD ABI definition which are shared by kernel and user space | 4 | * Portions of MTD ABI definition which are shared by kernel and user space |
5 | */ | 5 | */ |
@@ -61,6 +61,11 @@ struct mtd_oob_buf { | |||
61 | #define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme | 61 | #define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme |
62 | #define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read) | 62 | #define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read) |
63 | 63 | ||
64 | /* OTP mode selection */ | ||
65 | #define MTD_OTP_OFF 0 | ||
66 | #define MTD_OTP_FACTORY 1 | ||
67 | #define MTD_OTP_USER 2 | ||
68 | |||
64 | struct mtd_info_user { | 69 | struct mtd_info_user { |
65 | uint8_t type; | 70 | uint8_t type; |
66 | uint32_t flags; | 71 | uint32_t flags; |
@@ -98,6 +103,10 @@ struct otp_info { | |||
98 | #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo) | 103 | #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo) |
99 | #define MEMGETBADBLOCK _IOW('M', 11, loff_t) | 104 | #define MEMGETBADBLOCK _IOW('M', 11, loff_t) |
100 | #define MEMSETBADBLOCK _IOW('M', 12, loff_t) | 105 | #define MEMSETBADBLOCK _IOW('M', 12, loff_t) |
106 | #define OTPSELECT _IOR('M', 13, int) | ||
107 | #define OTPGETREGIONCOUNT _IOW('M', 14, int) | ||
108 | #define OTPGETREGIONINFO _IOW('M', 15, struct otp_info) | ||
109 | #define OTPLOCK _IOR('M', 16, struct otp_info) | ||
101 | 110 | ||
102 | struct nand_oobinfo { | 111 | struct nand_oobinfo { |
103 | uint32_t useecc; | 112 | uint32_t useecc; |