Home
last modified time | relevance | path

Searched refs:writesize (Results 1 – 25 of 99) sorted by relevance

1234

/drivers/mtd/tests/
Dnandbiterrs.c95 return mtdtest_write(mtd, offset, mtd->writesize, wbuffer); in write_page()
108 ops.len = mtd->writesize; in rewrite_page()
117 if (err || ops.retlen != mtd->writesize) { in rewrite_page()
140 err = mtd_read(mtd, offset, mtd->writesize, &read, rbuffer); in read_page()
144 if (err < 0 || read != mtd->writesize) { in read_page()
161 for (i = 0; i < mtd->writesize; i++) { in verify_page()
184 while (byte < mtd->writesize) { in insert_biterror()
208 for (i = 0; i < mtd->writesize; i++) in incremental_errors_test()
271 for (i = 0; i < mtd->writesize; i++) in overwrite_test()
351 mtd->writesize, mtd->oobsize); in mtd_nandbiterrs_init()
[all …]
Doobtest.c64 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in write_eraseblock()
174 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in verify_eraseblock()
294 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in verify_eraseblock_in_one_go()
370 pgcnt = mtd->erasesize / mtd->writesize; in mtd_oobtest_init()
376 mtd->writesize, ebcnt, pgcnt, mtd->oobsize); in mtd_oobtest_init()
553 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
573 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
600 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
620 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
650 addr = (loff_t)(i + 1) * mtd->erasesize - mtd->writesize; in mtd_oobtest_init()
[all …]
/drivers/mtd/nand/onenand/
Donenand_base.c445 if (addr & this->writesize) in onenand_command()
740 return this->writesize; in onenand_bufferram_offset()
881 if (addr & this->writesize) in onenand_get_2x_blockpage()
1101 this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize); in onenand_recover_lsb()
1126 int writesize = this->writesize; in onenand_mlc_read_ops_nolock() local
1148 thislen = min_t(int, writesize, len - read); in onenand_mlc_read_ops_nolock()
1150 column = from & (writesize - 1); in onenand_mlc_read_ops_nolock()
1151 if (column + thislen > writesize) in onenand_mlc_read_ops_nolock()
1152 thislen = writesize - column; in onenand_mlc_read_ops_nolock()
1155 this->command(mtd, ONENAND_CMD_READ, from, writesize); in onenand_mlc_read_ops_nolock()
[all …]
Donenand_samsung.c412 m += (this->writesize >> 2); in s3c_onenand_command()
416 mcount = mtd->writesize >> 2; in s3c_onenand_command()
483 p += this->writesize; in s3c_get_bufferram()
628 p += this->writesize; in s5pc110_read_bufferram()
634 !onenand->dma_addr || count != mtd->writesize) in s5pc110_read_bufferram()
676 if (count != mtd->writesize) { in s5pc110_read_bufferram()
678 memcpy_fromio(this->page_buf, p, mtd->writesize); in s5pc110_read_bufferram()
894 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
926 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
/drivers/mtd/nand/raw/
Dcadence-nand-controller.c1231 last_sec_size = mtd->writesize + mtd->oobsize; in cadence_nand_prepare_data_size()
1234 offset = mtd->writesize + cdns_chip->bbm_offs; in cadence_nand_prepare_data_size()
1434 mtd->writesize in cadence_nand_write_page()
1443 memset(cdns_ctrl->buf + mtd->writesize, 0xFF, in cadence_nand_write_page()
1451 if (cadence_nand_dma_buf_ok(cdns_ctrl, buf, mtd->writesize) && in cadence_nand_write_page()
1458 oob = cdns_ctrl->buf + mtd->writesize; in cadence_nand_write_page()
1463 mtd->writesize, in cadence_nand_write_page()
1476 memcpy(cdns_ctrl->buf + mtd->writesize, chip->oob_poi, in cadence_nand_write_page()
1480 memcpy(cdns_ctrl->buf, buf, mtd->writesize); in cadence_nand_write_page()
1487 mtd->writesize in cadence_nand_write_page()
[all …]
Dnand_micron.c233 ret = nand_change_read_column_op(chip, mtd->writesize, in micron_nand_on_die_ecc_status_4()
243 mtd->writesize + mtd->oobsize); in micron_nand_on_die_ecc_status_4()
259 rawbuf = micron->ecc.rawbuf + mtd->writesize + offs; in micron_nand_on_die_ecc_status_4()
333 !nand_read_data_op(chip, buf, mtd->writesize, false, true)) in micron_nand_read_page_on_die_ecc()
341 ret = nand_read_data_op(chip, buf, mtd->writesize, false, in micron_nand_read_page_on_die_ecc()
347 ret = nand_change_read_column_op(chip, 0, buf, mtd->writesize, in micron_nand_read_page_on_die_ecc()
350 ret = nand_change_read_column_op(chip, mtd->writesize, in micron_nand_read_page_on_die_ecc()
499 if (mtd->writesize == 2048) in micron_nand_init()
532 micron->ecc.rawbuf = kmalloc(mtd->writesize + in micron_nand_init()
Ddenali.c204 iowrite32(mtd->writesize, denali->reg + DEVICE_MAIN_AREA_SIZE); in denali_select_target()
247 int writesize = mtd->writesize; in denali_payload_xfer() local
255 if (pos >= writesize) { in denali_payload_xfer()
257 } else if (pos + len > writesize) { in denali_payload_xfer()
260 writesize - pos, write); in denali_payload_xfer()
264 buf += writesize - pos; in denali_payload_xfer()
265 len -= writesize - pos; in denali_payload_xfer()
266 pos = writesize + oob_skip; in denali_payload_xfer()
284 int writesize = mtd->writesize; in denali_oob_xfer() local
290 ret = denali_change_column(chip, writesize, buf, oob_skip, write); in denali_oob_xfer()
[all …]
Dmxc_nand.c255 u16 num_chunks = mtd->writesize / 512; in copy_spare()
302 if (mtd->writesize > 512) in mxc_do_addr_cycle()
314 if (mtd->writesize > 512) { in mxc_do_addr_cycle()
591 if (mtd->writesize > 512) in send_page_v1()
727 if (mtd->writesize > 512) in mxc_nand_read_page_v1()
730 no_subpages = mtd->writesize >> 9; in mxc_nand_read_page_v1()
764 memcpy32_fromio(buf, host->main_area0, mtd->writesize); in mxc_nand_read_page_v1()
786 if (mtd->writesize > 512) in mxc_nand_read_page_v2_v3()
793 memcpy32_fromio(buf, host->main_area0, mtd->writesize); in mxc_nand_read_page_v2_v3()
800 no_subpages = mtd->writesize >> 9; in mxc_nand_read_page_v2_v3()
[all …]
Dfsl_elbc_nand.c98 if (mtd->writesize > 512) in fsl_elbc_ooblayout_free()
252 if (elbc_fcm_ctrl->read_bytes == mtd->writesize + mtd->oobsize) { in fsl_elbc_run_command()
337 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
362 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
430 if (column >= mtd->writesize) { in fsl_elbc_cmdfunc()
432 column -= mtd->writesize; in fsl_elbc_cmdfunc()
487 elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc()
546 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf()
641 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in fsl_elbc_read_page()
659 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in fsl_elbc_write_page()
[all …]
Dnand_base.c52 int lastpage = (mtd->erasesize / mtd->writesize) - 1; in nand_pairing_dist3_get_info()
72 int lastpair = ((mtd->erasesize / mtd->writesize) - 1) / 2; in nand_pairing_dist3_get_wunit()
87 if (page >= mtd->erasesize / mtd->writesize) in nand_pairing_dist3_get_wunit()
228 int last_page = ((mtd->erasesize - mtd->writesize) >> in nand_bbm_get_next_page()
478 ofs + (page_offset * mtd->writesize), in nand_default_block_markbad()
969 if (offset_in_page > mtd->writesize + mtd->oobsize) in nand_fill_column_cycles()
977 if (mtd->writesize <= 512 && offset_in_page >= mtd->writesize) in nand_fill_column_cycles()
978 offset_in_page -= mtd->writesize; in nand_fill_column_cycles()
997 if (mtd->writesize <= 512) in nand_fill_column_cycles()
1027 if (offset_in_page >= mtd->writesize) in nand_sp_exec_read_page_op()
[all …]
Dcafe_nand.c185 if (mtd->writesize > 512 && in cafe_nand_cmdfunc()
187 column += mtd->writesize; in cafe_nand_cmdfunc()
205 if (mtd->size > mtd->writesize << 16) in cafe_nand_cmdfunc()
225 cafe->datalen = mtd->writesize + mtd->oobsize - column; in cafe_nand_cmdfunc()
244 else if (command == NAND_CMD_READ0 && mtd->writesize > 512) in cafe_nand_cmdfunc()
349 return nand_prog_page_op(chip, page, mtd->writesize, chip->oob_poi, in cafe_nand_write_oob()
381 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in cafe_nand_read_page()
540 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in cafe_nand_write_page_lowlevel()
613 if (mtd->writesize == 2048) in cafe_nand_attach_chip()
618 if (mtd->writesize == 2048) { in cafe_nand_attach_chip()
[all …]
Dnand_bbt.c197 from & ~mtd->writesize); in read_bbt()
201 from & ~mtd->writesize); in read_bbt()
325 ops.len = min(len, (size_t)mtd->writesize); in scan_read_oob()
336 buf += mtd->oobsize + mtd->writesize; in scan_read_oob()
337 len -= mtd->writesize; in scan_read_oob()
338 offs += mtd->writesize; in scan_read_oob()
375 ver_offs += mtd->writesize; in bbt_get_ver_offs()
397 mtd->writesize, td); in read_abs_bbts()
406 mtd->writesize, md); in read_abs_bbts()
435 ret = mtd_read_oob(mtd, offs + (page_offset * mtd->writesize), in scan_block_fast()
[all …]
Dmpc5121_nfc.c240 if (mtd->writesize > 512) in mpc5121_nfc_addr_cycle()
373 if (mtd->writesize > 512) in mpc5121_nfc_command()
416 sbsize = (mtd->oobsize / (mtd->writesize / 512)) & ~1; in mpc5121_nfc_copy_spare()
454 if (prv->spareonly || c >= mtd->writesize) { in mpc5121_nfc_buf_copy()
456 if (c >= mtd->writesize) in mpc5121_nfc_buf_copy()
457 c -= mtd->writesize; in mpc5121_nfc_buf_copy()
468 l = min((uint)len, mtd->writesize - c); in mpc5121_nfc_buf_copy()
576 mtd->writesize = rcw_pagesize; in mpc5121_nfc_read_hw_config()
788 switch (mtd->erasesize / mtd->writesize) { in mpc5121_nfc_probe()
Dfsl_ifc_nand.c106 if (mtd->writesize == 512 && in fsl_ifc_ooblayout_free()
154 ifc_nand_ctrl->addr = priv->vbase + buf_num * (mtd->writesize * 2); in set_addr()
159 ifc_nand_ctrl->index += mtd->writesize; in set_addr()
259 if (mtd->writesize > 512) { in fsl_ifc_do_read()
309 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc()
324 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc()
387 if (mtd->writesize > 512) { in fsl_ifc_cmdfunc()
427 if (column >= mtd->writesize) in fsl_ifc_cmdfunc()
435 if (column >= mtd->writesize) { in fsl_ifc_cmdfunc()
437 column -= mtd->writesize; in fsl_ifc_cmdfunc()
[all …]
Dvf610_nfc.c553 int trfr_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_read_page()
578 mtd->writesize, false); in vf610_nfc_read_page()
582 mtd->writesize, in vf610_nfc_read_page()
601 int trfr_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_write_page()
621 mtd->writesize, false); in vf610_nfc_write_page()
661 ret = nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in vf610_nfc_write_page_raw()
692 ret = nand_prog_page_begin_op(chip, page, mtd->writesize, in vf610_nfc_write_oob()
754 if (mtd->writesize + mtd->oobsize > PAGE_2K + OOB_MAX - 8) { in vf610_nfc_attach_chip()
762 if (mtd->writesize != PAGE_2K && mtd->oobsize < 64) { in vf610_nfc_attach_chip()
767 if (chip->ecc.size != mtd->writesize) { in vf610_nfc_attach_chip()
Dhisi504_nand.c268 hinfc_write(host, mtd->writesize + mtd->oobsize, in hisi_nfc_send_cmd_readstart()
439 host->offset = column + mtd->writesize; in hisi_nfc_cmdfunc()
526 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in hisi_nand_read_page_hwecc()
573 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in hisi_nand_write_page_hwecc()
667 if (mtd->writesize == 2048) in hisi_nfc_ecc_probe()
700 mtd->writesize + mtd->oobsize, in hisi_nfc_attach_chip()
705 host->dma_oob = host->dma_buffer + mtd->writesize; in hisi_nfc_attach_chip()
706 memset(host->buffer, 0xff, mtd->writesize + mtd->oobsize); in hisi_nfc_attach_chip()
710 switch (mtd->writesize) { in hisi_nfc_attach_chip()
Dsh_flctl.c606 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in flctl_read_page_hwecc()
617 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in flctl_write_page_hwecc()
645 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector()
711 write_ec_fiforeg(flctl, 16, mtd->writesize + 16 * sector); in execmd_write_page_sector()
769 flctl->read_bytes = mtd->writesize + mtd->oobsize; in flctl_cmdfunc()
785 set_addr(mtd, mtd->writesize, page_addr); in flctl_cmdfunc()
805 flctl->read_bytes = mtd->writesize + mtd->oobsize - column; in flctl_cmdfunc()
839 if (column >= mtd->writesize) { in flctl_cmdfunc()
840 column -= mtd->writesize; in flctl_cmdfunc()
866 if (flctl->seqin_column == mtd->writesize) in flctl_cmdfunc()
[all …]
Dmtk_nand.c326 if (!mtd->writesize) in mtk_nfc_hw_runtime_config()
331 switch (mtd->writesize) { in mtk_nfc_hw_runtime_config()
357 dev_err(nfc->dev, "invalid page len: %d\n", mtd->writesize); in mtk_nfc_hw_runtime_config()
686 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_format_subpage()
716 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_format_page()
856 memcpy(nfc->buffer, buf, mtd->writesize); in mtk_nfc_write_page()
866 len = mtd->writesize + (raw ? mtd->oobsize : 0); in mtk_nfc_write_page()
1051 return mtk_nfc_read_subpage(mtd, chip, 0, mtd->writesize, p, pg, 0); in mtk_nfc_read_page_hwecc()
1063 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_read_page_raw()
1064 ret = mtk_nfc_read_subpage(mtd, chip, 0, mtd->writesize, nfc->buffer, in mtk_nfc_read_page_raw()
[all …]
Dnand_samsung.c27 mtd->writesize = memorg->pagesize; in samsung_nand_decode_id()
125 if (mtd->writesize > 512) in samsung_nand_init()
Dnand_legacy.c259 if (column >= mtd->writesize) { in nand_command()
261 column -= mtd->writesize; in nand_command()
395 column += mtd->writesize; in nand_command_lp()
618 if (mtd->writesize > 512 && chip->legacy.cmdfunc == nand_command) in nand_legacy_adjust_cmdfunc()
/drivers/mtd/nand/raw/gpmi-nand/
Dgpmi-nand.c297 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in set_geometry_by_ecc_info()
347 geo->page_size = mtd->writesize + geo->metadata_size + in set_geometry_by_ecc_info()
350 geo->payload_size = mtd->writesize; in set_geometry_by_ecc_info()
360 block_mark_bit_offset = mtd->writesize * 8 - in set_geometry_by_ecc_info()
425 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in legacy_set_geometry()
438 geo->page_size = mtd->writesize + geo->metadata_size + in legacy_set_geometry()
440 geo->payload_size = mtd->writesize; in legacy_set_geometry()
503 block_mark_bit_offset = mtd->writesize * 8 - in legacy_set_geometry()
891 oobregion->length = geo->page_size - mtd->writesize; in gpmi_ooblayout_ecc()
907 if (geo->page_size < mtd->writesize + mtd->oobsize) { in gpmi_ooblayout_free()
[all …]
/drivers/usb/
Dusb-skeleton.c366 size_t writesize = min(count, (size_t)MAX_TRANSFER); in skel_write() local
409 buf = usb_alloc_coherent(dev->udev, writesize, GFP_KERNEL, in skel_write()
416 if (copy_from_user(buf, user_buffer, writesize)) { in skel_write()
432 buf, writesize, skel_write_bulk_callback, dev); in skel_write()
453 return writesize; in skel_write()
459 usb_free_coherent(dev->udev, writesize, buf, urb->transfer_dma); in skel_write()
/drivers/mtd/devices/
Dsst25l.c256 if ((uint32_t)to % mtd->writesize) in sst25l_write()
265 for (i = 0; i < len; i += mtd->writesize) { in sst25l_write()
285 bytes = min_t(uint32_t, mtd->writesize, len - i); in sst25l_write()
375 flash->mtd.writesize = flash_info->page_size; in sst25l_probe()
/drivers/usb/serial/
Dsierra.c424 size_t writesize = min((size_t)count, (size_t)MAX_TRANSFER); in sierra_write() local
434 dev_dbg(&port->dev, "%s: write (%zd bytes)\n", __func__, writesize); in sierra_write()
456 buffer = kmalloc(writesize, GFP_ATOMIC); in sierra_write()
468 memcpy(buffer, buf, writesize); in sierra_write()
470 usb_serial_debug_data(&port->dev, __func__, writesize, buffer); in sierra_write()
475 buffer, writesize, sierra_outdat_callback, port); in sierra_write()
507 return writesize; in sierra_write()
/drivers/mtd/
Dmtdconcat.c200 if (mtd->writesize > 1) { in concat_writev()
202 if (do_div(__to, mtd->writesize) || (total_len % mtd->writesize)) in concat_writev()
673 concat->mtd.writesize = subdev[0]->writesize; in mtd_concat_create()
735 if (concat->mtd.writesize != subdev[i]->writesize || in mtd_concat_create()

1234