summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2021-03-16 11:40:15 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-06-12 17:16:33 +0200
commit51d6820f49ca4a203cf30dd99bc83f25d569eb4b (patch)
treef7955ee2d8d27fb2b1325ad583ffce6f409a4fab /include
parent2ca0bbf296d6f7ce51b8255347c7fd08afa33651 (diff)
mtd-utils: Add flash_otp_erase
On some SPI NOR flashes you can actually erase the OTP region until its fully locked. Add a small utility for that. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/mtd/mtd-abi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index bcd7496..a54c386 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -201,6 +201,8 @@ struct otp_info {
* modes (see "struct mtd_write_req")
*/
#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