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
95 * struct mtd_read_req_ecc_stats - ECC statistics for a read operation
114 * struct mtd_read_req - data structure for requesting a read operation
119 * @usr_data: user-provided data buffer
120 * @usr_oob: user-provided OOB buffer
121 * @mode: MTD mode (see "MTD operation modes")
126 * reads in various modes. To read from OOB-only, set @usr_data == NULL, and to
127 * read data-only, set @usr_oob == NULL. However, setting both @usr_data and
136 __u8 mode; member
165 #define MTD_NANDECC_PLACE 1 /* Use the given placement in the structure (YAFFS1 legacy mode) */
170 /* OTP mode selection */
201 * #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
206 #define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
208 #define MEMERASE _IOW('M', 2, struct erase_info_user)
209 /* Write out-of-band data from MTD */
210 #define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
211 /* Read out-of-band data from MTD */
212 #define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
214 #define MEMLOCK _IOW('M', 5, struct erase_info_user)
216 #define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
218 #define MEMGETREGIONCOUNT _IOR('M', 7, int)
220 #define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
221 /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
222 #define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
224 #define MEMGETBADBLOCK _IOW('M', 11, __kernel_loff_t)
226 #define MEMSETBADBLOCK _IOW('M', 12, __kernel_loff_t)
227 /* Set OTP (One-Time Programmable) mode (factory vs. user) */
228 #define OTPSELECT _IOR('M', 13, int)
229 /* Get number of OTP (One-Time Programmable) regions */
230 #define OTPGETREGIONCOUNT _IOW('M', 14, int)
231 /* Get all OTP (One-Time Programmable) info about MTD */
232 #define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
233 /* Lock a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
234 #define OTPLOCK _IOR('M', 16, struct otp_info)
236 #define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout_user)
238 #define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
239 /* Set MTD mode on a per-file-descriptor basis (see "MTD file modes") */
240 #define MTDFILEMODE _IO('M', 19)
241 /* Erase segment of MTD (supports 64-bit address) */
242 #define MEMERASE64 _IOW('M', 20, struct erase_info_user64)
243 /* Write data to OOB (64-bit version) */
244 #define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64)
245 /* Read data from OOB (64-bit version) */
246 #define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64)
248 #define MEMISLOCKED _IOR('M', 23, struct erase_info_user)
250 * Most generic write interface; can write in-band and/or out-of-band in various
254 #define MEMWRITE _IOWR('M', 24, struct mtd_write_req)
255 /* Erase a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
256 #define OTPERASE _IOW('M', 25, struct otp_info)
258 * Most generic read interface; can read in-band and/or out-of-band in various
262 #define MEMREAD _IOWR('M', 26, struct mtd_read_req)
283 * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl
298 * struct mtd_ecc_stats - error correction stats
313 * MTD file modes - for read/write access to MTD
316 * @MTD_FILE_MODE_OTP_FACTORY: OTP enabled in factory mode
317 * @MTD_FILE_MODE_OTP_USER: OTP enabled in user mode
320 * These modes can be set via ioctl(MTDFILEMODE). The mode will be retained
323 * Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW -
325 * Wherever possible, the MTD_OPS_* mode will override the MTD_FILE_MODE_* mode
339 return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH; in mtd_type_is_nand_user()