Lines Matching defs:mtd
2 * $Id: mtd.h,v 1.61 2005/11/07 11:14:54 gleixner Exp $
13 #error This is a kernel header. Perhaps include mtd-user.h instead?
21 #include <linux/mtd/compatmac.h>
22 #include <mtd/mtd-abi.h>
38 struct mtd_info *mtd;
53 u_int32_t offset; /* At which this region starts, from the beginning of the MTD */
105 u_int32_t size; // Total size of the MTD
132 #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize
133 #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype
151 int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
154 int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
157 void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len);
160 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
161 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
163 int (*read_oob) (struct mtd_info *mtd, loff_t from,
165 int (*write_oob) (struct mtd_info *mtd, loff_t to,
173 int (*get_fact_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
174 int (*read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
175 int (*get_user_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
176 int (*read_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
177 int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
178 int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len);
184 int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen);
187 void (*sync) (struct mtd_info *mtd);
190 int (*lock) (struct mtd_info *mtd, loff_t ofs, size_t len);
191 int (*unlock) (struct mtd_info *mtd, loff_t ofs, size_t len);
194 int (*suspend) (struct mtd_info *mtd);
195 void (*resume) (struct mtd_info *mtd);
198 int (*block_isbad) (struct mtd_info *mtd, loff_t ofs);
199 int (*block_markbad) (struct mtd_info *mtd, loff_t ofs);
215 extern int add_mtd_device(struct mtd_info *mtd);
216 extern int del_mtd_device (struct mtd_info *mtd);
218 extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
220 extern void put_mtd_device(struct mtd_info *mtd);
224 void (*add)(struct mtd_info *mtd);
225 void (*remove)(struct mtd_info *mtd);
233 int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
236 int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs,