Home
last modified time | relevance | path

Searched refs:mtd (Results 1 – 13 of 13) sorted by relevance

/fs/logfs/
Ddev_mtd.c19 struct mtd_info *mtd = logfs_super(sb)->s_mtd; in logfs_mtd_read() local
23 ret = mtd_read(mtd, ofs, len, &retlen, buf); in logfs_mtd_read()
39 struct mtd_info *mtd = super->s_mtd; in loffs_mtd_write() local
47 BUG_ON((ofs >= mtd->size) || (len > mtd->size - ofs)); in loffs_mtd_write()
52 ret = mtd_write(mtd, ofs, len, &retlen, buf); in loffs_mtd_write()
93 struct mtd_info *mtd = logfs_super(sb)->s_mtd; in logfs_mtd_erase() local
98 BUG_ON(len % mtd->erasesize); in logfs_mtd_erase()
103 ei.mtd = mtd; in logfs_mtd_erase()
108 ret = mtd_erase(mtd, &ei); in logfs_mtd_erase()
120 struct mtd_info *mtd = logfs_super(sb)->s_mtd; in logfs_mtd_sync() local
[all …]
Dsuper.c134 struct mtd_info *mtd = super->s_mtd; in logfs_sb_test() local
136 if (mtd && sb->s_mtd == mtd) in logfs_sb_test()
/fs/romfs/
Dmmap-nommu.c29 struct mtd_info *mtd = inode->i_sb->s_mtd; in romfs_get_unmapped_area() local
33 if (!mtd) in romfs_get_unmapped_area()
48 if (len > mtd->size || pgoff >= (mtd->size >> PAGE_SHIFT)) in romfs_get_unmapped_area()
52 if (offset >= mtd->size) in romfs_get_unmapped_area()
55 if ((offset + len) > mtd->size) in romfs_get_unmapped_area()
56 len = mtd->size - offset; in romfs_get_unmapped_area()
58 ret = mtd_get_unmapped_area(mtd, len, offset, flags); in romfs_get_unmapped_area()
75 struct mtd_info *mtd = file_inode(file)->i_sb->s_mtd; in romfs_mmap_capabilities() local
77 if (!mtd) in romfs_mmap_capabilities()
79 return mtd_mmap_capabilities(mtd); in romfs_mmap_capabilities()
/fs/jffs2/
Dwbuf.c237 ret = mtd_read(c->mtd, ofs, c->wbuf_pagesize, &retlen, c->wbuf_verify); in jffs2_verify_write()
288 if (c->wbuf_ofs % c->mtd->erasesize) in jffs2_wbuf_recover()
348 ret = mtd_read(c->mtd, start, c->wbuf_ofs - start, &retlen, in jffs2_wbuf_recover()
425 mtd_write(c->mtd, ofs, towrite, &retlen, brokenbuf); in jffs2_wbuf_recover()
429 ret = mtd_write(c->mtd, ofs, towrite, &retlen, in jffs2_wbuf_recover()
632 mtd_write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, in __jffs2_flush_wbuf()
638 ret = mtd_write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, in __jffs2_flush_wbuf()
876 ret = mtd_write(c->mtd, outvec_to, PAGE_DIV(vlen), in jffs2_flash_writev()
963 return mtd_read(c->mtd, ofs, len, retlen, buf); in jffs2_flash_read()
967 ret = mtd_read(c->mtd, ofs, len, retlen, buf); in jffs2_flash_read()
[all …]
Dos-linux.h79 #define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf))
107 #define jffs2_can_mark_obsolete(c) (c->mtd->flags & (MTD_BIT_WRITEABLE))
110 #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
129 #define jffs2_dataflash(c) (c->mtd->type == MTD_DATAFLASH)
132 #define jffs2_ubivol(c) (c->mtd->type == MTD_UBIVOLUME)
136 #define jffs2_nor_wbuf_flash(c) (c->mtd->type == MTD_NORFLASH && ! (c->mtd->flags & MTD_BIT_WRITEAB…
Derase.c70 instr->mtd = c->mtd; in jffs2_erase_block()
79 ret = mtd_erase(c->mtd, instr); in jffs2_erase_block()
348 ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen, in jffs2_block_check_erase()
359 mtd_unpoint(c->mtd, jeb->offset, retlen); in jffs2_block_check_erase()
368 mtd_unpoint(c->mtd, jeb->offset, c->sector_size); in jffs2_block_check_erase()
394 ret = mtd_read(c->mtd, ofs, readlen, &retlen, ebuf); in jffs2_block_check_erase()
Dwritev.c29 return mtd_writev(c->mtd, vecs, count, to, retlen); in jffs2_flash_direct_writev()
36 ret = mtd_write(c->mtd, ofs, len, retlen, buf); in jffs2_flash_direct_write()
Dsuper.c228 if (opt > c->mtd->size) { in jffs2_parse_options()
230 "is %llu KB\n", c->mtd->size / 1024); in jffs2_parse_options()
287 c->mtd = sb->s_mtd; in jffs2_fill_super()
343 mtd_sync(c->mtd); in jffs2_put_super()
Dfs.c219 buf->f_fsid.val[1] = c->mtd->index; in jffs2_statfs()
520 if (c->mtd->type == MTD_MLCNANDFLASH) in jffs2_do_fill_super()
524 if (c->mtd->type == MTD_NANDFLASH) { in jffs2_do_fill_super()
528 if (c->mtd->type == MTD_DATAFLASH) { in jffs2_do_fill_super()
534 c->flash_size = c->mtd->size; in jffs2_do_fill_super()
535 c->sector_size = c->mtd->erasesize; in jffs2_do_fill_super()
Dscan.c101 ret = mtd_point(c->mtd, 0, c->mtd->size, &pointlen, in jffs2_scan_medium()
103 if (!ret && pointlen < c->mtd->size) { in jffs2_scan_medium()
107 mtd_unpoint(c->mtd, 0, pointlen); in jffs2_scan_medium()
124 flashbuf = mtd_kmalloc_up_to(c->mtd, &try_size); in jffs2_scan_medium()
281 mtd_unpoint(c->mtd, 0, c->mtd->size); in jffs2_scan_medium()
465 if (mtd_block_isbad(c->mtd, jeb->offset)) in jffs2_scan_eraseblock()
Djffs2_fs_sb.h49 struct mtd_info *mtd; member
Dbackground.c45 tsk = kthread_run(jffs2_garbage_collect_thread, c, "jffs2_gcd_mtd%d", c->mtd->index); in jffs2_start_garbage_collect_thread()
Dreadinode.c67 err = mtd_point(c->mtd, ofs, len, &retlen, (void **)&buffer, NULL); in check_node_data()
70 mtd_unpoint(c->mtd, ofs, retlen); in check_node_data()
104 mtd_unpoint(c->mtd, ofs, len); in check_node_data()
140 mtd_unpoint(c->mtd, ofs, len); in check_node_data()