Lines Matching refs:mtd_info

35 struct mtd_info;
114 int (*ecc)(struct mtd_info *mtd, int section,
116 int (*free)(struct mtd_info *mtd, int section,
190 int (*get_info)(struct mtd_info *mtd, int wunit,
192 int (*get_wunit)(struct mtd_info *mtd,
207 struct mtd_info { struct
285 int (*_erase) (struct mtd_info *mtd, struct erase_info *instr); argument
286 int (*_point) (struct mtd_info *mtd, loff_t from, size_t len, argument
288 int (*_unpoint) (struct mtd_info *mtd, loff_t from, size_t len); argument
289 int (*_read) (struct mtd_info *mtd, loff_t from, size_t len, argument
291 int (*_write) (struct mtd_info *mtd, loff_t to, size_t len, argument
293 int (*_panic_write) (struct mtd_info *mtd, loff_t to, size_t len, argument
295 int (*_read_oob) (struct mtd_info *mtd, loff_t from, argument
297 int (*_write_oob) (struct mtd_info *mtd, loff_t to, argument
299 int (*_get_fact_prot_info) (struct mtd_info *mtd, size_t len, argument
301 int (*_read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, argument
303 int (*_get_user_prot_info) (struct mtd_info *mtd, size_t len, argument
305 int (*_read_user_prot_reg) (struct mtd_info *mtd, loff_t from, argument
307 int (*_write_user_prot_reg) (struct mtd_info *mtd, loff_t to, argument
309 int (*_lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, argument
311 int (*_writev) (struct mtd_info *mtd, const struct kvec *vecs, argument
313 void (*_sync) (struct mtd_info *mtd); argument
314 int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); argument
315 int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len); argument
316 int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); argument
317 int (*_block_isreserved) (struct mtd_info *mtd, loff_t ofs); argument
318 int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs); argument
319 int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs); argument
320 int (*_max_bad_blocks) (struct mtd_info *mtd, loff_t ofs, size_t len); argument
321 int (*_suspend) (struct mtd_info *mtd); argument
322 void (*_resume) (struct mtd_info *mtd); argument
323 void (*_reboot) (struct mtd_info *mtd); argument
328 int (*_get_device) (struct mtd_info *mtd); argument
329 void (*_put_device) (struct mtd_info *mtd); argument
346 int mtd_ooblayout_ecc(struct mtd_info *mtd, int section, argument
348 int mtd_ooblayout_find_eccregion(struct mtd_info *mtd, int eccbyte,
351 int mtd_ooblayout_get_eccbytes(struct mtd_info *mtd, u8 *eccbuf,
353 int mtd_ooblayout_set_eccbytes(struct mtd_info *mtd, const u8 *eccbuf,
355 int mtd_ooblayout_free(struct mtd_info *mtd, int section,
357 int mtd_ooblayout_get_databytes(struct mtd_info *mtd, u8 *databuf,
359 int mtd_ooblayout_set_databytes(struct mtd_info *mtd, const u8 *databuf,
361 int mtd_ooblayout_count_freebytes(struct mtd_info *mtd);
362 int mtd_ooblayout_count_eccbytes(struct mtd_info *mtd);
364 static inline void mtd_set_ooblayout(struct mtd_info *mtd, in mtd_set_ooblayout()
370 static inline void mtd_set_pairing_scheme(struct mtd_info *mtd, in mtd_set_pairing_scheme()
376 static inline void mtd_set_of_node(struct mtd_info *mtd, in mtd_set_of_node()
384 static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd) in mtd_get_of_node()
389 static inline u32 mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops) in mtd_oobavail()
394 static inline int mtd_max_bad_blocks(struct mtd_info *mtd, in mtd_max_bad_blocks()
406 int mtd_wunit_to_pairing_info(struct mtd_info *mtd, int wunit,
408 int mtd_pairing_info_to_wunit(struct mtd_info *mtd,
410 int mtd_pairing_groups(struct mtd_info *mtd);
411 int mtd_erase(struct mtd_info *mtd, struct erase_info *instr);
412 int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,
414 int mtd_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
415 unsigned long mtd_get_unmapped_area(struct mtd_info *mtd, unsigned long len,
417 int mtd_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,
419 int mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
421 int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
424 int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops);
425 int mtd_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops);
427 int mtd_get_fact_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen,
429 int mtd_read_fact_prot_reg(struct mtd_info *mtd, loff_t from, size_t len,
431 int mtd_get_user_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen,
433 int mtd_read_user_prot_reg(struct mtd_info *mtd, loff_t from, size_t len,
435 int mtd_write_user_prot_reg(struct mtd_info *mtd, loff_t to, size_t len,
437 int mtd_lock_user_prot_reg(struct mtd_info *mtd, loff_t from, size_t len);
439 int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
442 static inline void mtd_sync(struct mtd_info *mtd) in mtd_sync()
448 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
449 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
450 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len);
451 int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs);
452 int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs);
453 int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs);
455 static inline int mtd_suspend(struct mtd_info *mtd) in mtd_suspend()
460 static inline void mtd_resume(struct mtd_info *mtd) in mtd_resume()
466 static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_eb()
474 static inline uint32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_eb()
490 static inline void mtd_align_erase_req(struct mtd_info *mtd, in mtd_align_erase_req()
509 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_ws()
517 static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_ws()
524 static inline int mtd_wunit_per_eb(struct mtd_info *mtd) in mtd_wunit_per_eb()
529 static inline int mtd_offset_to_wunit(struct mtd_info *mtd, loff_t offs) in mtd_offset_to_wunit()
534 static inline loff_t mtd_wunit_to_offset(struct mtd_info *mtd, loff_t base, in mtd_wunit_to_offset()
541 static inline int mtd_has_oob(const struct mtd_info *mtd) in mtd_has_oob()
546 static inline int mtd_type_is_nand(const struct mtd_info *mtd) in mtd_type_is_nand()
551 static inline int mtd_can_have_bb(const struct mtd_info *mtd) in mtd_can_have_bb()
561 extern int mtd_device_parse_register(struct mtd_info *mtd,
568 extern int mtd_device_unregister(struct mtd_info *master);
569 extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
570 extern int __get_mtd_device(struct mtd_info *mtd);
571 extern void __put_mtd_device(struct mtd_info *mtd);
572 extern struct mtd_info *get_mtd_device_nm(const char *name);
573 extern void put_mtd_device(struct mtd_info *mtd);
577 void (*add)(struct mtd_info *mtd);
578 void (*remove)(struct mtd_info *mtd);
585 void *mtd_kmalloc_up_to(const struct mtd_info *mtd, size_t *size);
599 unsigned mtd_mmap_capabilities(struct mtd_info *mtd);