diff options
author | Nicolas Pitre <nico@cam.org> | 2005-02-08 17:45:55 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 12:26:04 +0200 |
commit | 31f4233baeaaeb7c563d2766781c6592ad259b6a (patch) | |
tree | 475ffcfcc1fe91a47d6b8c413d8f25b3fdfcc1c0 /include/mtd | |
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')
-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 091eb571e99..c984cb2c941 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h @@ -1,5 +1,5 @@ /* - * $Id: mtd-abi.h,v 1.8 2005/02/08 17:11:16 nico Exp $ + * $Id: mtd-abi.h,v 1.9 2005/02/08 17:45:52 nico Exp $ * * Portions of MTD ABI definition which are shared by kernel and user space */ @@ -61,6 +61,11 @@ struct mtd_oob_buf { #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 @@ struct otp_info { #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; |