Lines Matching refs:mtd_info

22 struct mtd_info;
101 int (*ecc)(struct mtd_info *mtd, int section,
103 int (*free)(struct mtd_info *mtd, int section,
177 int (*get_info)(struct mtd_info *mtd, int wunit,
179 int (*get_wunit)(struct mtd_info *mtd,
197 struct mtd_info { struct
276 int (*_erase) (struct mtd_info *mtd, struct erase_info *instr); argument
277 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len, argument
279 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len); argument
280 int (*_read) (struct mtd_info *mtd, loff_t from, size_t len, argument
282 int (*_write) (struct mtd_info *mtd, loff_t to, size_t len, argument
284 int (*_panic_write) (struct mtd_info *mtd, loff_t to, size_t len, argument
286 int (*_read_oob) (struct mtd_info *mtd, loff_t from, argument
288 int (*_write_oob) (struct mtd_info *mtd, loff_t to, argument
290 int (*_get_fact_prot_info) (struct mtd_info *mtd, size_t len, argument
292 int (*_read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, argument
294 int (*_get_user_prot_info) (struct mtd_info *mtd, size_t len, argument
296 int (*_read_user_prot_reg) (struct mtd_info *mtd, loff_t from, argument
298 int (*_write_user_prot_reg) (struct mtd_info *mtd, loff_t to, argument
300 int (*_lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, argument
302 int (*_writev) (struct mtd_info *mtd, const struct kvec *vecs, argument
304 void (*_sync) (struct mtd_info *mtd); argument
305 int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); argument
306 int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); argument
307 int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); argument
308 int (*_block_isreserved) (struct mtd_info *mtd, loff_t ofs); argument
309 int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs); argument
310 int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs); argument
311 int (*_max_bad_blocks) (struct mtd_info *mtd, loff_t ofs, size_t len); argument
312 int (*_suspend) (struct mtd_info *mtd); argument
313 void (*_resume) (struct mtd_info *mtd); argument
314 void (*_reboot) (struct mtd_info *mtd); argument
319 int (*_get_device) (struct mtd_info *mtd); argument
320 void (*_put_device) (struct mtd_info *mtd); argument
344 int mtd_ooblayout_ecc(struct mtd_info *mtd, int section, argument
346 int mtd_ooblayout_find_eccregion(struct mtd_info *mtd, int eccbyte,
349 int mtd_ooblayout_get_eccbytes(struct mtd_info *mtd, u8 *eccbuf,
351 int mtd_ooblayout_set_eccbytes(struct mtd_info *mtd, const u8 *eccbuf,
353 int mtd_ooblayout_free(struct mtd_info *mtd, int section,
355 int mtd_ooblayout_get_databytes(struct mtd_info *mtd, u8 *databuf,
357 int mtd_ooblayout_set_databytes(struct mtd_info *mtd, const u8 *databuf,
359 int mtd_ooblayout_count_freebytes(struct mtd_info *mtd);
360 int mtd_ooblayout_count_eccbytes(struct mtd_info *mtd);
362 static inline void mtd_set_ooblayout(struct mtd_info *mtd, in mtd_set_ooblayout()
368 static inline void mtd_set_pairing_scheme(struct mtd_info *mtd, in mtd_set_pairing_scheme()
374 static inline void mtd_set_of_node(struct mtd_info *mtd, in mtd_set_of_node()
382 static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd) in mtd_get_of_node()
387 static inline u32 mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops) in mtd_oobavail()
392 static inline int mtd_max_bad_blocks(struct mtd_info *mtd, in mtd_max_bad_blocks()
404 int mtd_wunit_to_pairing_info(struct mtd_info *mtd, int wunit,
406 int mtd_pairing_info_to_wunit(struct mtd_info *mtd,
408 int mtd_pairing_groups(struct mtd_info *mtd);
409 int mtd_erase(struct mtd_info *mtd, struct erase_info *instr);
410 int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,
412 int mtd_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
413 unsigned long mtd_get_unmapped_area(struct mtd_info *mtd, unsigned long len,
415 int mtd_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,
417 int mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
419 int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
422 int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops);
423 int mtd_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops);
425 int mtd_get_fact_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen,
427 int mtd_read_fact_prot_reg(struct mtd_info *mtd, loff_t from, size_t len,
429 int mtd_get_user_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen,
431 int mtd_read_user_prot_reg(struct mtd_info *mtd, loff_t from, size_t len,
433 int mtd_write_user_prot_reg(struct mtd_info *mtd, loff_t to, size_t len,
435 int mtd_lock_user_prot_reg(struct mtd_info *mtd, loff_t from, size_t len);
437 int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
440 static inline void mtd_sync(struct mtd_info *mtd) in mtd_sync()
446 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
447 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
448 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len);
449 int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs);
450 int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs);
451 int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs);
453 static inline int mtd_suspend(struct mtd_info *mtd) in mtd_suspend()
458 static inline void mtd_resume(struct mtd_info *mtd) in mtd_resume()
464 static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_eb()
472 static inline uint32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_eb()
488 static inline void mtd_align_erase_req(struct mtd_info *mtd, in mtd_align_erase_req()
507 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_ws()
515 static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_ws()
522 static inline int mtd_wunit_per_eb(struct mtd_info *mtd) in mtd_wunit_per_eb()
527 static inline int mtd_offset_to_wunit(struct mtd_info *mtd, loff_t offs) in mtd_offset_to_wunit()
532 static inline loff_t mtd_wunit_to_offset(struct mtd_info *mtd, loff_t base, in mtd_wunit_to_offset()
539 static inline int mtd_has_oob(const struct mtd_info *mtd) in mtd_has_oob()
544 static inline int mtd_type_is_nand(const struct mtd_info *mtd) in mtd_type_is_nand()
549 static inline int mtd_can_have_bb(const struct mtd_info *mtd) in mtd_can_have_bb()
559 extern int mtd_device_parse_register(struct mtd_info *mtd,
566 extern int mtd_device_unregister(struct mtd_info *master);
567 extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
568 extern int __get_mtd_device(struct mtd_info *mtd);
569 extern void __put_mtd_device(struct mtd_info *mtd);
570 extern struct mtd_info *get_mtd_device_nm(const char *name);
571 extern void put_mtd_device(struct mtd_info *mtd);
575 void (*add)(struct mtd_info *mtd);
576 void (*remove)(struct mtd_info *mtd);
583 void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size);
597 unsigned mtd_mmap_capabilities(struct mtd_info *mtd);