Lines Matching +full:m +full:- +full:mode

1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
3 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org> et al.
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
55 * @MTD_OPS_RAW: data are transferred as-is, with no error correction;
56 * this mode implies %MTD_OPS_PLACE_OOB
69 * struct mtd_write_req - data structure for requesting a write operation
74 * @usr_data: user-provided data buffer
75 * @usr_oob: user-provided OOB buffer
76 * @mode: MTD mode (see "MTD operation modes")
80 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
81 * write data-only, set @usr_oob == NULL. However, setting both @usr_data and
90 __u8 mode; member
118 #define MTD_NANDECC_PLACE 1 /* Use the given placement in the structure (YAFFS1 legacy mode) */
123 /* OTP mode selection */
154 * #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
159 #define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
161 #define MEMERASE _IOW('M', 2, struct erase_info_user)
162 /* Write out-of-band data from MTD */
163 #define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
164 /* Read out-of-band data from MTD */
165 #define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
167 #define MEMLOCK _IOW('M', 5, struct erase_info_user)
169 #define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
171 #define MEMGETREGIONCOUNT _IOR('M', 7, int)
173 #define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
174 /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
175 #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
177 #define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t)
179 #define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t)
180 /* Set OTP (One-Time Programmable) mode (factory vs. user) */
181 #define OTPSELECT _IOR('M', 13, int)
182 /* Get number of OTP (One-Time Programmable) regions */
183 #define OTPGETREGIONCOUNT _IOW('M', 14, int)
184 /* Get all OTP (One-Time Programmable) info about MTD */
185 #define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
186 /* Lock a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
187 #define OTPLOCK _IOR('M', 16, struct otp_info)
189 #define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout_user)
191 #define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
192 /* Set MTD mode on a per-file-descriptor basis (see "MTD file modes") */
193 #define MTDFILEMODE _IO('M', 19)
194 /* Erase segment of MTD (supports 64-bit address) */
195 #define MEMERASE64 _IOW('M', 20, struct erase_info_user64)
196 /* Write data to OOB (64-bit version) */
197 #define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64)
198 /* Read data from OOB (64-bit version) */
199 #define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64)
201 #define MEMISLOCKED _IOR('M', 23, struct erase_info_user)
203 * Most generic write interface; can write in-band and/or out-of-band in various
207 #define MEMWRITE _IOWR('M', 24, struct mtd_write_req)
228 * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl
243 * struct mtd_ecc_stats - error correction stats
258 * MTD file modes - for read/write access to MTD
261 * @MTD_FILE_MODE_OTP_FACTORY: OTP enabled in factory mode
262 * @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode
265 * These modes can be set via ioctl(MTDFILEMODE). The mode will be retained
268 * Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW -
270 * Wherever possible, the MTD_OPS_* mode will override the MTD_FILE_MODE_* mode
283 return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH; in mtd_type_is_nand_user()