/linux-3.4.99/include/linux/mtd/ |
D | mtd.h | 92 size_t retlen; member 182 size_t *retlen, void **virt, resource_size_t *phys); 189 size_t *retlen, u_char *buf); 191 size_t *retlen, const u_char *buf); 193 size_t *retlen, const u_char *buf); 201 size_t len, size_t *retlen, u_char *buf); 205 size_t len, size_t *retlen, u_char *buf); 207 size_t len, size_t *retlen, u_char *buf); 211 unsigned long count, loff_t to, size_t *retlen); 247 int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, [all …]
|
/linux-3.4.99/drivers/mtd/ |
D | nftlcore.c | 137 size_t *retlen, uint8_t *buf) in nftl_read_oob() argument 150 *retlen = ops.oobretlen; in nftl_read_oob() 158 size_t *retlen, uint8_t *buf) in nftl_write_oob() argument 171 *retlen = ops.oobretlen; in nftl_write_oob() 181 size_t *retlen, uint8_t *buf, uint8_t *oob) in nftl_write() argument 195 *retlen = ops.retlen; in nftl_write() 256 size_t retlen; in NFTL_foldchain() local 280 (block * 512), 16 , &retlen, in NFTL_foldchain() 396 8, &retlen, (char *)&oob.u); in NFTL_foldchain() 422 &retlen, in NFTL_foldchain() [all …]
|
D | inftlcore.c | 150 size_t *retlen, uint8_t *buf) in inftl_read_oob() argument 162 *retlen = ops.oobretlen; in inftl_read_oob() 170 size_t *retlen, uint8_t *buf) in inftl_write_oob() argument 182 *retlen = ops.oobretlen; in inftl_write_oob() 190 size_t *retlen, uint8_t *buf, uint8_t *oob) in inftl_write() argument 203 *retlen = ops.retlen; in inftl_write() 258 size_t retlen; in INFTL_foldchain() local 286 + (block * SECTORSIZE), 16, &retlen, in INFTL_foldchain() 349 &retlen, in INFTL_foldchain() 355 &retlen, in INFTL_foldchain() [all …]
|
D | nftlmount.c | 42 size_t retlen; in find_boot_record() local 67 &retlen, buf); in find_boot_record() 70 if (retlen != SECTORSIZE) { in find_boot_record() 82 if (retlen < 6 || memcmp(buf, "ANAND", 6)) { in find_boot_record() 93 SECTORSIZE + 8, 8, &retlen, in find_boot_record() 113 &retlen, buf) < 0)) { in find_boot_record() 232 i + SECTORSIZE, SECTORSIZE, &retlen, in find_boot_record() 274 size_t retlen; in check_free_sectors() local 278 if (mtd_read(mtd, address, SECTORSIZE, &retlen, buf)) in check_free_sectors() 285 &retlen, &buf[SECTORSIZE]) < 0) in check_free_sectors() [all …]
|
D | bcm63xxpart.c | 49 size_t retlen; in bcm63xx_detect_cfe() local 51 ret = mtd_read(master, BCM963XX_CFE_VERSION_OFFSET, 5, &retlen, in bcm63xx_detect_cfe() 53 buf[retlen] = 0; in bcm63xx_detect_cfe() 62 ret = mtd_read(master, BCM63XX_CFE_MAGIC_OFFSET, 8, &retlen, in bcm63xx_detect_cfe() 64 buf[retlen] = 0; in bcm63xx_detect_cfe() 78 size_t retlen; in bcm63xx_parse_cfe_partitions() local 98 ret = mtd_read(master, cfelen, sizeof(struct bcm_tag), &retlen, in bcm63xx_parse_cfe_partitions() 101 if (retlen != sizeof(struct bcm_tag)) { in bcm63xx_parse_cfe_partitions()
|
D | rfd_ftl.c | 155 size_t retlen; in scan_header() local 204 part->header_size, &retlen, in scan_header() 207 if (!rc && retlen != part->header_size) in scan_header() 245 size_t retlen; in rfd_ftl_readsect() local 253 rc = mtd_read(part->mbd.mtd, addr, SECTOR_SIZE, &retlen, in rfd_ftl_readsect() 255 if (!rc && retlen != SECTOR_SIZE) in rfd_ftl_readsect() 274 size_t retlen; in erase_callback() local 308 &retlen, (u_char *)&magic); in erase_callback() 310 if (!rc && retlen != sizeof(magic)) in erase_callback() 361 size_t retlen; in move_block_contents() local [all …]
|
D | mtdcore.c | 711 int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, in mtd_point() argument 714 *retlen = 0; in mtd_point() 724 return mtd->_point(mtd, from, len, retlen, virt, phys); in mtd_point() 757 int mtd_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, in mtd_read() argument 760 *retlen = 0; in mtd_read() 765 return mtd->_read(mtd, from, len, retlen, buf); in mtd_read() 769 int mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, in mtd_write() argument 772 *retlen = 0; in mtd_write() 779 return mtd->_write(mtd, to, len, retlen, buf); in mtd_write() 790 int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, in mtd_panic_write() argument [all …]
|
D | mtdblock.c | 71 size_t retlen; in erase_write() local 105 ret = mtd_write(mtd, pos, len, &retlen, buf); in erase_write() 108 if (retlen != len) in erase_write() 148 size_t retlen; in do_cached_write() local 155 return mtd_write(mtd, pos, len, &retlen, buf); in do_cached_write() 188 &retlen, mtdblk->cache_data); in do_cached_write() 191 if (retlen != sect_size) in do_cached_write() 218 size_t retlen; in do_cached_read() local 225 return mtd_read(mtd, pos, len, &retlen, buf); in do_cached_read() 244 ret = mtd_read(mtd, pos, size, &retlen, buf); in do_cached_read() [all …]
|
D | mtdblock_ro.c | 31 size_t retlen; in mtdblock_readsect() local 33 if (mtd_read(dev->mtd, (block * 512), 512, &retlen, buf)) in mtdblock_readsect() 41 size_t retlen; in mtdblock_writesect() local 43 if (mtd_write(dev->mtd, (block * 512), 512, &retlen, buf)) in mtdblock_writesect()
|
D | mtdchar.c | 199 size_t retlen; in mtdchar_read() local 224 &retlen, kbuf); in mtdchar_read() 228 &retlen, kbuf); in mtdchar_read() 240 retlen = ops.retlen; in mtdchar_read() 244 ret = mtd_read(mtd, *ppos, len, &retlen, kbuf); in mtdchar_read() 256 *ppos += retlen; in mtdchar_read() 257 if (copy_to_user(buf, kbuf, retlen)) { in mtdchar_read() 262 total_retlen += retlen; in mtdchar_read() 264 count -= retlen; in mtdchar_read() 265 buf += retlen; in mtdchar_read() [all …]
|
D | inftlmount.c | 54 size_t retlen; in find_boot_record() local 77 &retlen, buf); in find_boot_record() 80 if (retlen != SECTORSIZE) { in find_boot_record() 96 if (retlen < 6 || memcmp(buf, "BNAND", 6)) { in find_boot_record() 104 8, &retlen,(char *)&h1); in find_boot_record() 122 &retlen, buf); in find_boot_record() 123 if (retlen != SECTORSIZE) { in find_boot_record() 342 size_t retlen; in check_free_sectors() local 346 if (mtd_read(mtd, address, SECTORSIZE, &retlen, buf)) in check_free_sectors() 353 &retlen, &buf[SECTORSIZE]) < 0) in check_free_sectors() [all …]
|
D | ftl.c | 412 ssize_t retlen; in prepare_xfer() local 425 ret = mtd_write(part->mbd.mtd, xfer->Offset, sizeof(header), &retlen, in prepare_xfer() 441 ret = mtd_write(part->mbd.mtd, offset, sizeof(uint32_t), &retlen, in prepare_xfer() 473 ssize_t retlen; in copy_erase_unit() local 489 part->BlocksPerUnit * sizeof(uint32_t), &retlen, in copy_erase_unit() 506 ret = mtd_write(part->mbd.mtd, offset, sizeof(uint16_t), &retlen, in copy_erase_unit() 526 ret = mtd_read(part->mbd.mtd, src, SECTOR_SIZE, &retlen, in copy_erase_unit() 534 ret = mtd_write(part->mbd.mtd, dest, SECTOR_SIZE, &retlen, in copy_erase_unit() 556 &retlen, in copy_erase_unit() 566 &retlen, (u_char *)&srcunitswap); in copy_erase_unit() [all …]
|
D | mtdpart.c | 61 size_t *retlen, u_char *buf) in part_read() argument 69 retlen, buf); in part_read() 80 size_t *retlen, void **virt, resource_size_t *phys) in part_point() argument 85 retlen, virt, phys); in part_point() 146 size_t len, size_t *retlen, u_char *buf) in part_read_user_prot_reg() argument 150 retlen, buf); in part_read_user_prot_reg() 161 size_t len, size_t *retlen, u_char *buf) in part_read_fact_prot_reg() argument 165 retlen, buf); in part_read_fact_prot_reg() 176 size_t *retlen, const u_char *buf) in part_write() argument 180 retlen, buf); in part_write() [all …]
|
D | mtdoops.c | 215 size_t retlen; in mtdoops_write() local 226 record_size, &retlen, cxt->oops_buf); in mtdoops_write() 233 record_size, &retlen, cxt->oops_buf); in mtdoops_write() 235 if (retlen != record_size || ret < 0) in mtdoops_write() 237 cxt->nextpage * record_size, retlen, record_size, ret); in mtdoops_write() 257 size_t retlen; in find_next_position() local 265 &retlen, (u_char *)&count[0]); in find_next_position() 266 if (retlen != MTDOOPS_HEADER_SIZE || in find_next_position() 269 page * record_size, retlen, in find_next_position()
|
/linux-3.4.99/fs/jffs2/ |
D | erase.c | 344 size_t retlen; in jffs2_block_check_erase() local 348 ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen, in jffs2_block_check_erase() 355 if (retlen < c->sector_size) { in jffs2_block_check_erase() 358 retlen); in jffs2_block_check_erase() 359 mtd_unpoint(c->mtd, jeb->offset, retlen); in jffs2_block_check_erase() 363 retlen /= sizeof(*wordebuf); in jffs2_block_check_erase() 367 } while(--retlen); in jffs2_block_check_erase() 369 if (retlen) { in jffs2_block_check_erase() 373 c->sector_size-retlen * sizeof(*wordebuf)); in jffs2_block_check_erase() 394 ret = mtd_read(c->mtd, ofs, readlen, &retlen, ebuf); in jffs2_block_check_erase() [all …]
|
D | writev.c | 17 unsigned long count, loff_t to, size_t *retlen) in jffs2_flash_direct_writev() argument 29 return mtd_writev(c->mtd, vecs, count, to, retlen); in jffs2_flash_direct_writev() 33 size_t *retlen, const u_char *buf) in jffs2_flash_direct_write() argument 36 ret = mtd_write(c->mtd, ofs, len, retlen, buf); in jffs2_flash_direct_write()
|
D | wbuf.c | 233 size_t retlen; in jffs2_verify_write() local 236 ret = mtd_read(c->mtd, ofs, c->wbuf_pagesize, &retlen, c->wbuf_verify); in jffs2_verify_write() 241 } else if (retlen != c->wbuf_pagesize) { in jffs2_verify_write() 243 __func__, ofs, retlen, c->wbuf_pagesize); in jffs2_verify_write() 278 size_t retlen; in jffs2_wbuf_recover() local 347 ret = mtd_read(c->mtd, start, c->wbuf_ofs - start, &retlen, in jffs2_wbuf_recover() 352 (retlen == c->wbuf_ofs - start)) in jffs2_wbuf_recover() 355 if (ret || retlen != c->wbuf_ofs - start) { in jffs2_wbuf_recover() 424 mtd_write(c->mtd, ofs, towrite, &retlen, brokenbuf); in jffs2_wbuf_recover() 428 ret = mtd_write(c->mtd, ofs, towrite, &retlen, in jffs2_wbuf_recover() [all …]
|
D | os-linux.h | 78 #define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, b… argument 79 #define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf)) argument 114 …sb_info *c, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen, uint32_t ino); 115 int jffs2_flash_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, const u_char… 116 int jffs2_flash_read(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, u_char *buf); 196 unsigned long count, loff_t to, size_t *retlen); 198 size_t *retlen, const u_char *buf);
|
D | xattr_trusted.c | 40 size_t retlen = XATTR_TRUSTED_PREFIX_LEN + name_len + 1; in jffs2_trusted_listxattr() local 42 if (list && retlen<=list_size) { in jffs2_trusted_listxattr() 47 return retlen; in jffs2_trusted_listxattr()
|
D | xattr_user.c | 40 size_t retlen = XATTR_USER_PREFIX_LEN + name_len + 1; in jffs2_user_listxattr() local 42 if (list && retlen <= list_size) { in jffs2_user_listxattr() 47 return retlen; in jffs2_user_listxattr()
|
D | security.c | 74 size_t retlen = XATTR_SECURITY_PREFIX_LEN + name_len + 1; in jffs2_security_listxattr() local 76 if (list && retlen <= list_size) { in jffs2_security_listxattr() 81 return retlen; in jffs2_security_listxattr()
|
/linux-3.4.99/drivers/mtd/devices/ |
D | mtdram.c | 44 size_t *retlen, void **virt, resource_size_t *phys) in ram_point() argument 47 *retlen = len; in ram_point() 70 size_t *retlen, u_char *buf) in ram_read() argument 73 *retlen = len; in ram_read() 78 size_t *retlen, const u_char *buf) in ram_write() argument 81 *retlen = len; in ram_write()
|
D | pmc551.c | 137 size_t *retlen, void **virt, resource_size_t *phys); 146 size_t retlen; in pmc551_erase() local 159 pmc551_point(mtd, instr->addr, instr->len, &retlen, in pmc551_erase() 180 priv->asize, &retlen, in pmc551_erase() 197 size_t *retlen, void **virt, resource_size_t *phys) in pmc551_point() argument 218 *retlen = len; in pmc551_point() 231 size_t * retlen, u_char * buf) in pmc551_read() argument 251 pmc551_point(mtd, from, len, retlen, (void **)&ptr, NULL); in pmc551_read() 272 pmc551_point(mtd, soff_hi, priv->asize, retlen, in pmc551_read() 283 *retlen = copyto - buf; in pmc551_read() [all …]
|
D | phram.c | 53 size_t *retlen, void **virt, resource_size_t *phys) in phram_point() argument 56 *retlen = len; in phram_point() 66 size_t *retlen, u_char *buf) in phram_read() argument 71 *retlen = len; in phram_read() 76 size_t *retlen, const u_char *buf) in phram_write() argument 81 *retlen = len; in phram_write()
|
D | block2mtd.c | 99 size_t *retlen, u_char *buf) in block2mtd_read() argument 123 if (retlen) in block2mtd_read() 124 *retlen += cpylen; in block2mtd_read() 135 loff_t to, size_t len, size_t *retlen) in _block2mtd_write() argument 164 if (retlen) in _block2mtd_write() 165 *retlen += cpylen; in _block2mtd_write() 176 size_t *retlen, const u_char *buf) in block2mtd_write() argument 182 err = _block2mtd_write(dev, buf, to, len, retlen); in block2mtd_write()
|