Lines Matching refs:nand_device
136 struct nand_device;
155 int (*erase)(struct nand_device *nand, const struct nand_pos *pos);
156 int (*markbad)(struct nand_device *nand, const struct nand_pos *pos);
157 bool (*isbad)(struct nand_device *nand, const struct nand_pos *pos);
179 struct nand_device { struct
212 static inline struct nand_device *mtd_to_nanddev(struct mtd_info *mtd) in mtd_to_nanddev()
214 return container_of(mtd, struct nand_device, mtd); in mtd_to_nanddev()
223 static inline struct mtd_info *nanddev_to_mtd(struct nand_device *nand) in nanddev_to_mtd()
234 static inline unsigned int nanddev_bits_per_cell(const struct nand_device *nand) in nanddev_bits_per_cell()
245 static inline size_t nanddev_page_size(const struct nand_device *nand) in nanddev_page_size()
257 nanddev_per_page_oobsize(const struct nand_device *nand) in nanddev_per_page_oobsize()
269 nanddev_pages_per_eraseblock(const struct nand_device *nand) in nanddev_pages_per_eraseblock()
281 nanddev_pages_per_target(const struct nand_device *nand) in nanddev_pages_per_target()
294 static inline size_t nanddev_eraseblock_size(const struct nand_device *nand) in nanddev_eraseblock_size()
306 nanddev_eraseblocks_per_lun(const struct nand_device *nand) in nanddev_eraseblocks_per_lun()
318 nanddev_eraseblocks_per_target(const struct nand_device *nand) in nanddev_eraseblocks_per_target()
329 static inline u64 nanddev_target_size(const struct nand_device *nand) in nanddev_target_size()
343 static inline unsigned int nanddev_ntargets(const struct nand_device *nand) in nanddev_ntargets()
354 static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand) in nanddev_neraseblocks()
366 static inline u64 nanddev_size(const struct nand_device *nand) in nanddev_size()
381 nanddev_get_memorg(struct nand_device *nand) in nanddev_get_memorg()
386 int nanddev_init(struct nand_device *nand, const struct nand_ops *ops,
388 void nanddev_cleanup(struct nand_device *nand);
400 static inline int nanddev_register(struct nand_device *nand) in nanddev_register()
415 static inline int nanddev_unregister(struct nand_device *nand) in nanddev_unregister()
427 static inline void nanddev_set_of_node(struct nand_device *nand, in nanddev_set_of_node()
439 static inline struct device_node *nanddev_get_of_node(struct nand_device *nand) in nanddev_get_of_node()
454 static inline unsigned int nanddev_offs_to_pos(struct nand_device *nand, in nanddev_offs_to_pos()
509 static inline loff_t nanddev_pos_to_offs(struct nand_device *nand, in nanddev_pos_to_offs()
534 static inline unsigned int nanddev_pos_to_row(struct nand_device *nand, in nanddev_pos_to_row()
550 static inline void nanddev_pos_next_target(struct nand_device *nand, in nanddev_pos_next_target()
568 static inline void nanddev_pos_next_lun(struct nand_device *nand, in nanddev_pos_next_lun()
588 static inline void nanddev_pos_next_eraseblock(struct nand_device *nand, in nanddev_pos_next_eraseblock()
607 static inline void nanddev_pos_next_page(struct nand_device *nand, in nanddev_pos_next_page()
626 static inline void nanddev_io_iter_init(struct nand_device *nand, in nanddev_io_iter_init()
655 static inline void nanddev_io_iter_next_page(struct nand_device *nand, in nanddev_io_iter_next_page()
682 static inline bool nanddev_io_iter_end(struct nand_device *nand, in nanddev_io_iter_end()
706 bool nanddev_isbad(struct nand_device *nand, const struct nand_pos *pos);
707 bool nanddev_isreserved(struct nand_device *nand, const struct nand_pos *pos);
708 int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos);
709 int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos);
721 int nanddev_bbt_init(struct nand_device *nand);
722 void nanddev_bbt_cleanup(struct nand_device *nand);
723 int nanddev_bbt_update(struct nand_device *nand);
724 int nanddev_bbt_get_block_status(const struct nand_device *nand,
726 int nanddev_bbt_set_block_status(struct nand_device *nand, unsigned int entry,
728 int nanddev_bbt_markbad(struct nand_device *nand, unsigned int block);
740 static inline unsigned int nanddev_bbt_pos_to_entry(struct nand_device *nand, in nanddev_bbt_pos_to_entry()
754 static inline bool nanddev_bbt_is_initialized(struct nand_device *nand) in nanddev_bbt_is_initialized()