Lines Matching refs:dev
20 static int apply_chunk_offset(struct yaffs_dev *dev, int chunk)
22 return chunk - dev->chunk_offset;
25 int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
30 int flash_chunk = apply_chunk_offset(dev, nand_chunk);
32 dev->n_page_reads++;
38 result = dev->tagger.read_chunk_tags_fn(dev, flash_chunk, buffer, tags);
42 bi = yaffs_get_block_info(dev,
44 dev->param.chunks_per_block);
45 yaffs_handle_chunk_error(dev, bi);
50 int yaffs_wr_chunk_tags_nand(struct yaffs_dev *dev,
55 int flash_chunk = apply_chunk_offset(dev, nand_chunk);
57 dev->n_page_writes++;
65 tags->seq_number = dev->seq_number;
71 result = dev->tagger.write_chunk_tags_fn(dev, flash_chunk,
74 yaffs_summary_add(dev, tags, nand_chunk);
79 int yaffs_mark_bad(struct yaffs_dev *dev, int block_no)
81 block_no -= dev->block_offset;
82 dev->n_bad_markings++;
84 if (dev->param.disable_bad_block_marking)
87 return dev->tagger.mark_bad_fn(dev, block_no);
91 int yaffs_query_init_block_state(struct yaffs_dev *dev,
96 block_no -= dev->block_offset;
97 return dev->tagger.query_block_fn(dev, block_no, state, seq_number);
100 int yaffs_erase_block(struct yaffs_dev *dev, int block_no)
104 block_no -= dev->block_offset;
105 dev->n_erasures++;
106 result = dev->drv.drv_erase_fn(dev, block_no);
110 int yaffs_init_nand(struct yaffs_dev *dev)
112 if (dev->drv.drv_initialise_fn)
113 return dev->drv.drv_initialise_fn(dev);
117 int yaffs_deinit_nand(struct yaffs_dev *dev)
119 if (dev->drv.drv_deinitialise_fn)
120 return dev->drv.drv_deinitialise_fn(dev);