summaryrefslogtreecommitdiff
path: root/include/uapi/mtd
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2021-03-03 21:18:19 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-03-28 19:24:54 +0200
commite3c1f1c92d6ede3cfa09d6a103d3d1c1ef645e35 (patch)
tree3349a378304c85ffac78c3c2de03c6824ba23c95 /include/uapi/mtd
parent1e97743fd180981bef5f01402342bb54bf1c6366 (diff)
mtd: add OTP (one-time-programmable) erase ioctl
This may sound like a contradiction but some SPI-NOR flashes really support erasing their OTP region until it is finally locked. Having the possibility to erase an OTP region might come in handy during development. The ioctl argument follows the OTPLOCK style. Signed-off-by: Michael Walle <michael@walle.cc> Acked-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210303201819.2752-1-michael@walle.cc
Diffstat (limited to 'include/uapi/mtd')
-rw-r--r--include/uapi/mtd/mtd-abi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h
index 65b9db936557..b869990c2db2 100644
--- a/include/uapi/mtd/mtd-abi.h
+++ b/include/uapi/mtd/mtd-abi.h
@@ -205,6 +205,8 @@ struct otp_info {
* without OOB, e.g., NOR flash.
*/
#define MEMWRITE _IOWR('M', 24, struct mtd_write_req)
+/* Erase a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
+#define OTPERASE _IOW('M', 25, struct otp_info)
/*
* Obsolete legacy interface. Keep it in order not to break userspace