• Home
  • Raw
  • Download

Lines Matching refs:mtd

23 	struct mtd_info *mtd;  member
48 static int erase_write (struct mtd_info *mtd, unsigned long pos, in erase_write() argument
62 erase.mtd = mtd; in erase_write()
71 ret = mtd->erase(mtd, &erase); in erase_write()
77 pos, len, mtd->name); in erase_write()
88 ret = mtd->write(mtd, pos, len, &retlen, buf); in erase_write()
99 struct mtd_info *mtd = mtdblk->mtd; in write_cached_data() local
106 "at 0x%lx, size 0x%x\n", mtd->name, in write_cached_data()
109 ret = erase_write (mtd, mtdblk->cache_offset, in write_cached_data()
129 struct mtd_info *mtd = mtdblk->mtd; in do_cached_write() local
135 mtd->name, pos, len); in do_cached_write()
138 return mtd->write(mtd, pos, len, &retlen, buf); in do_cached_write()
153 ret = erase_write (mtd, pos, size, buf); in do_cached_write()
170 ret = mtd->read(mtd, sect_start, sect_size, in do_cached_write()
199 struct mtd_info *mtd = mtdblk->mtd; in do_cached_read() local
205 mtd->name, pos, len); in do_cached_read()
208 return mtd->read(mtd, pos, len, &retlen, buf); in do_cached_read()
227 ret = mtd->read(mtd, pos, size, &retlen, buf); in do_cached_read()
254 mtdblk->cache_data = vmalloc(mtdblk->mtd->erasesize); in mtdblock_writesect()
268 struct mtd_info *mtd = mbd->mtd; in mtdblock_open() local
284 mtdblk->mtd = mtd; in mtdblock_open()
288 if ( !(mtdblk->mtd->flags & MTD_NO_ERASE) && mtdblk->mtd->erasesize) { in mtdblock_open()
289 mtdblk->cache_size = mtdblk->mtd->erasesize; in mtdblock_open()
314 if (mtdblk->mtd->sync) in mtdblock_release()
315 mtdblk->mtd->sync(mtdblk->mtd); in mtdblock_release()
332 if (mtdblk->mtd->sync) in mtdblock_flush()
333 mtdblk->mtd->sync(mtdblk->mtd); in mtdblock_flush()
337 static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) in mtdblock_add_mtd() argument
344 dev->mtd = mtd; in mtdblock_add_mtd()
345 dev->devnum = mtd->index; in mtdblock_add_mtd()
347 dev->size = mtd->size >> 9; in mtdblock_add_mtd()
350 if (!(mtd->flags & MTD_WRITEABLE)) in mtdblock_add_mtd()