Lines Matching refs:dev
20 int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk, in yaffs_rd_chunk_tags_nand() argument
25 int flash_chunk = nand_chunk - dev->chunk_offset; in yaffs_rd_chunk_tags_nand()
27 dev->n_page_reads++; in yaffs_rd_chunk_tags_nand()
33 if (dev->param.read_chunk_tags_fn) in yaffs_rd_chunk_tags_nand()
35 dev->param.read_chunk_tags_fn(dev, flash_chunk, buffer, in yaffs_rd_chunk_tags_nand()
38 result = yaffs_tags_compat_rd(dev, in yaffs_rd_chunk_tags_nand()
43 bi = yaffs_get_block_info(dev, in yaffs_rd_chunk_tags_nand()
45 dev->param.chunks_per_block); in yaffs_rd_chunk_tags_nand()
46 yaffs_handle_chunk_error(dev, bi); in yaffs_rd_chunk_tags_nand()
51 int yaffs_wr_chunk_tags_nand(struct yaffs_dev *dev, in yaffs_wr_chunk_tags_nand() argument
56 int flash_chunk = nand_chunk - dev->chunk_offset; in yaffs_wr_chunk_tags_nand()
58 dev->n_page_writes++; in yaffs_wr_chunk_tags_nand()
61 tags->seq_number = dev->seq_number; in yaffs_wr_chunk_tags_nand()
72 if (dev->param.write_chunk_tags_fn) in yaffs_wr_chunk_tags_nand()
73 result = dev->param.write_chunk_tags_fn(dev, flash_chunk, in yaffs_wr_chunk_tags_nand()
76 result = yaffs_tags_compat_wr(dev, flash_chunk, buffer, tags); in yaffs_wr_chunk_tags_nand()
78 yaffs_summary_add(dev, tags, nand_chunk); in yaffs_wr_chunk_tags_nand()
83 int yaffs_mark_bad(struct yaffs_dev *dev, int block_no) in yaffs_mark_bad() argument
85 block_no -= dev->block_offset; in yaffs_mark_bad()
86 if (dev->param.bad_block_fn) in yaffs_mark_bad()
87 return dev->param.bad_block_fn(dev, block_no); in yaffs_mark_bad()
89 return yaffs_tags_compat_mark_bad(dev, block_no); in yaffs_mark_bad()
92 int yaffs_query_init_block_state(struct yaffs_dev *dev, in yaffs_query_init_block_state() argument
97 block_no -= dev->block_offset; in yaffs_query_init_block_state()
98 if (dev->param.query_block_fn) in yaffs_query_init_block_state()
99 return dev->param.query_block_fn(dev, block_no, state, in yaffs_query_init_block_state()
102 return yaffs_tags_compat_query_block(dev, block_no, state, seq_number); in yaffs_query_init_block_state()
105 int yaffs_erase_block(struct yaffs_dev *dev, int flash_block) in yaffs_erase_block() argument
109 flash_block -= dev->block_offset; in yaffs_erase_block()
110 dev->n_erasures++; in yaffs_erase_block()
111 result = dev->param.erase_fn(dev, flash_block); in yaffs_erase_block()
115 int yaffs_init_nand(struct yaffs_dev *dev) in yaffs_init_nand() argument
117 if (dev->param.initialise_flash_fn) in yaffs_init_nand()
118 return dev->param.initialise_flash_fn(dev); in yaffs_init_nand()