From 51d6820f49ca4a203cf30dd99bc83f25d569eb4b Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Tue, 16 Mar 2021 11:40:15 +0100 Subject: 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 Signed-off-by: David Oberhollenzer --- include/mtd/mtd-abi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') 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 -- cgit v1.2.3