hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/include/uapi/mtd/mtd-abi.h
....@@ -104,6 +104,7 @@
104104 #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */
105105 #define MTD_NO_ERASE 0x1000 /* No erase necessary */
106106 #define MTD_POWERUP_LOCK 0x2000 /* Always locked after reset */
107
+#define MTD_SLC_ON_MLC_EMULATION 0x4000 /* Emulate SLC behavior on MLC NANDs */
107108
108109 /* Some common devices / combinations of capabilities */
109110 #define MTD_CAP_ROM 0
....@@ -113,11 +114,11 @@
113114 #define MTD_CAP_NVRAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
114115
115116 /* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */
116
-#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended)
117
-#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode)
118
-#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
119
-#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read)
120
-#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default
117
+#define MTD_NANDECC_OFF 0 /* Switch off ECC (Not recommended) */
118
+#define MTD_NANDECC_PLACE 1 /* Use the given placement in the structure (YAFFS1 legacy mode) */
119
+#define MTD_NANDECC_AUTOPLACE 2 /* Use the default placement scheme */
120
+#define MTD_NANDECC_PLACEONLY 3 /* Use the given placement in the structure (Do not store ecc result on read) */
121
+#define MTD_NANDECC_AUTOPL_USR 4 /* Use the given autoplacement scheme rather than using the default */
121122
122123 /* OTP mode selection */
123124 #define MTD_OTP_OFF 0
....@@ -261,7 +262,7 @@
261262 * @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode
262263 * @MTD_FILE_MODE_RAW: OTP disabled, ECC disabled
263264 *
264
- * These modes can be set via ioctl(MTDFILEMODE). The mode mode will be retained
265
+ * These modes can be set via ioctl(MTDFILEMODE). The mode will be retained
265266 * separately for each open file descriptor.
266267 *
267268 * Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW -