Home
last modified time | relevance | path

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

12345

/linux/drivers/mtd/tests/
H A 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 …]
/linux/tools/testing/selftests/mm/
H A Dhugetlb_dio.c29 size_t writesize; in run_dio_using_hugetlb() local
35 writesize = end_off - start_off; in run_dio_using_hugetlb()
63 memset(buffer, 'A', writesize); in run_dio_using_hugetlb()
66 if (write(fd, buffer, writesize) != (writesize)) { in run_dio_using_hugetlb()
/linux/drivers/mtd/nand/onenand/
H A 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 …]
H A Donenand_samsung.c413 m += (this->writesize >> 2); in s3c_onenand_command()
417 mcount = mtd->writesize >> 2; in s3c_onenand_command()
484 p += this->writesize; in s3c_get_bufferram()
629 p += this->writesize; in s5pc110_read_bufferram()
635 !onenand->dma_addr || count != mtd->writesize) in s5pc110_read_bufferram()
677 if (count != mtd->writesize) { in s5pc110_read_bufferram()
679 memcpy_fromio(this->page_buf, p, mtd->writesize); in s5pc110_read_bufferram()
893 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
924 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
/linux/drivers/mtd/nand/raw/
H A Dmxc_nand.c254 u16 num_chunks = mtd->writesize / 512; in copy_spare()
361 no_subpages = mtd->writesize >> 9; in get_ecc_status_v1()
396 no_subpages = mtd->writesize >> 9; in get_ecc_status_v2_v3()
595 if (mtd->writesize > 512) in send_page_v1()
715 if (mtd->writesize) in mxc_nand_read_page_v1()
716 no_subpages = mtd->writesize >> 9; in mxc_nand_read_page_v1()
758 ret = nand_read_page_op(chip, page, 0, buf, mtd->writesize); in mxc_nand_read_page()
777 ret = nand_read_page_op(chip, page, 0, buf, mtd->writesize); in mxc_nand_read_page_raw()
793 ret = nand_read_page_op(chip, page, 0, host->data_buf, mtd->writesize); in mxc_nand_read_oob()
813 ret = nand_prog_page_op(chip, page, 0, buf, mtd->writesize); in mxc_nand_write_page_ecc()
[all …]
H A Dcadence-nand-controller.c1236 last_sec_size = mtd->writesize + mtd->oobsize; in cadence_nand_prepare_data_size()
1239 offset = mtd->writesize + cdns_chip->bbm_offs; in cadence_nand_prepare_data_size()
1439 mtd->writesize in cadence_nand_write_page()
1448 memset(cdns_ctrl->buf + mtd->writesize, 0xFF, in cadence_nand_write_page()
1456 if (cadence_nand_dma_buf_ok(cdns_ctrl, buf, mtd->writesize) && in cadence_nand_write_page()
1463 oob = cdns_ctrl->buf + mtd->writesize; in cadence_nand_write_page()
1468 mtd->writesize, in cadence_nand_write_page()
1481 memcpy(cdns_ctrl->buf + mtd->writesize, chip->oob_poi, in cadence_nand_write_page()
1485 memcpy(cdns_ctrl->buf, buf, mtd->writesize); in cadence_nand_write_page()
1492 mtd->writesize in cadence_nand_write_page()
[all …]
H A 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()
H A 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 …]
H A Dfsl_elbc_nand.c97 if (mtd->writesize > 512) in fsl_elbc_ooblayout_free()
251 if (elbc_fcm_ctrl->read_bytes == mtd->writesize + mtd->oobsize) { in fsl_elbc_run_command()
336 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
361 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
429 if (column >= mtd->writesize) { in fsl_elbc_cmdfunc()
431 column -= mtd->writesize; in fsl_elbc_cmdfunc()
486 elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc()
545 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf()
640 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in fsl_elbc_read_page()
658 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in fsl_elbc_write_page()
[all …]
H A Drenesas-nand-controller.c411 .len = mtd->writesize, in rnandc_read_page_hw_ecc()
412 .ecc_offset = ECC_OFFSET(mtd->writesize + 2), in rnandc_read_page_hw_ecc()
427 dma_addr = dma_map_single(rnandc->dev, rnandc->buf, mtd->writesize, in rnandc_read_page_hw_ecc()
430 writel(mtd->writesize, rnandc->regs + DMA_CNT_REG); in rnandc_read_page_hw_ecc()
437 dma_unmap_single(rnandc->dev, dma_addr, mtd->writesize, DMA_FROM_DEVICE); in rnandc_read_page_hw_ecc()
447 ret = nand_change_read_column_op(chip, mtd->writesize, in rnandc_read_page_hw_ecc()
482 memcpy(buf, rnandc->buf, mtd->writesize); in rnandc_read_page_hw_ecc()
507 .ecc_offset = ECC_OFFSET(mtd->writesize + ecc_off), in rnandc_read_subpage_hw_ecc()
543 ret = nand_change_read_column_op(chip, mtd->writesize, in rnandc_read_subpage_hw_ecc()
591 .len = mtd->writesize, in rnandc_write_page_hw_ecc()
[all …]
H A 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 …]
H A 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()
524 ofs + (page_offset * mtd->writesize), in nand_default_block_markbad()
1096 bool ident_stage = !mtd->writesize; in nand_fill_column_cycles()
1101 if (offset_in_page > mtd->writesize + mtd->oobsize) in nand_fill_column_cycles()
1109 if (mtd->writesize <= 512 && offset_in_page >= mtd->writesize) in nand_fill_column_cycles()
1110 offset_in_page -= mtd->writesize; in nand_fill_column_cycles()
1130 if (!ident_stage && mtd->writesize <= 512) in nand_fill_column_cycles()
[all …]
H A 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()
780 switch (mtd->erasesize / mtd->writesize) { in mpc5121_nfc_probe()
H A 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 …]
H A 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 …]
H A Drockchip-nand-controller.c515 pages_per_blk = mtd->erasesize / mtd->writesize; in rk_nfc_write_page_raw()
527 memset(nfc->page_buf, 0xff, mtd->writesize + mtd->oobsize); in rk_nfc_write_page_raw()
584 rk_nfc_write_buf(nfc, buf, mtd->writesize + mtd->oobsize); in rk_nfc_write_page_raw()
597 int pages_per_blk = mtd->erasesize / mtd->writesize; in rk_nfc_write_page_hwecc()
606 memcpy(nfc->page_buf, buf, mtd->writesize); in rk_nfc_write_page_hwecc()
608 memset(nfc->page_buf, 0xFF, mtd->writesize); in rk_nfc_write_page_hwecc()
658 mtd->writesize, DMA_TO_DEVICE); in rk_nfc_write_page_hwecc()
679 dma_unmap_single(nfc->dev, dma_data, mtd->writesize, in rk_nfc_write_page_hwecc()
709 pages_per_blk = mtd->erasesize / mtd->writesize; in rk_nfc_read_page_raw()
721 rk_nfc_read_buf(nfc, nfc->page_buf, mtd->writesize + mtd->oobsize); in rk_nfc_read_page_raw()
[all …]
H A Dvf610_nfc.c554 int trfr_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_read_page()
579 mtd->writesize, false); in vf610_nfc_read_page()
583 mtd->writesize, in vf610_nfc_read_page()
602 int trfr_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_write_page()
622 mtd->writesize, false); in vf610_nfc_write_page()
662 ret = nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in vf610_nfc_write_page_raw()
693 ret = nand_prog_page_begin_op(chip, page, mtd->writesize, in vf610_nfc_write_oob()
755 if (mtd->writesize + mtd->oobsize > PAGE_2K + OOB_MAX - 8) { in vf610_nfc_attach_chip()
763 if (mtd->writesize != PAGE_2K && mtd->oobsize < 64) { in vf610_nfc_attach_chip()
768 if (chip->ecc.size != mtd->writesize) { in vf610_nfc_attach_chip()
H A 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()
H A Dsh_flctl.c605 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in flctl_read_page_hwecc()
616 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in flctl_write_page_hwecc()
644 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector()
710 write_ec_fiforeg(flctl, 16, mtd->writesize + 16 * sector); in execmd_write_page_sector()
768 flctl->read_bytes = mtd->writesize + mtd->oobsize; in flctl_cmdfunc()
784 set_addr(mtd, mtd->writesize, page_addr); in flctl_cmdfunc()
804 flctl->read_bytes = mtd->writesize + mtd->oobsize - column; in flctl_cmdfunc()
838 if (column >= mtd->writesize) { in flctl_cmdfunc()
839 column -= mtd->writesize; in flctl_cmdfunc()
865 if (flctl->seqin_column == mtd->writesize) in flctl_cmdfunc()
[all …]
H A Dmtk_nand.c325 if (!mtd->writesize) in mtk_nfc_hw_runtime_config()
330 switch (mtd->writesize) { in mtk_nfc_hw_runtime_config()
356 dev_err(nfc->dev, "invalid page len: %d\n", mtd->writesize); in mtk_nfc_hw_runtime_config()
685 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_format_subpage()
715 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_format_page()
855 memcpy(nfc->buffer, buf, mtd->writesize); in mtk_nfc_write_page()
865 len = mtd->writesize + (raw ? mtd->oobsize : 0); in mtk_nfc_write_page()
1050 return mtk_nfc_read_subpage(mtd, chip, 0, mtd->writesize, p, pg, 0); in mtk_nfc_read_page_hwecc()
1062 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_read_page_raw()
1063 ret = mtk_nfc_read_subpage(mtd, chip, 0, mtd->writesize, nfc->buffer, in mtk_nfc_read_page_raw()
[all …]
H A Dnand_samsung.c27 mtd->writesize = memorg->pagesize; in samsung_nand_decode_id()
125 if (mtd->writesize > 512) in samsung_nand_init()
H A Dintel-nand-controller.c394 ret = ebu_dma_start(ebu_host, DMA_DEV_TO_MEM, buf, mtd->writesize); in ebu_nand_read_page_hwecc()
419 ret = ebu_dma_start(ebu_host, DMA_MEM_TO_DEV, buf, mtd->writesize); in ebu_nand_write_page_hwecc()
452 u32 writesize = mtd->writesize; in ebu_nand_attach_chip() local
489 ecc_steps = writesize / ecc_size; in ebu_nand_attach_chip()
495 pagesize = fls(writesize >> 11); in ebu_nand_attach_chip()
499 pg_per_blk = fls((blocksize / writesize) >> 6) / 8; in ebu_nand_attach_chip()
/linux/drivers/mtd/nand/raw/gpmi-nand/
H A Dgpmi-nand.c283 i = (mtd->writesize * 8 - geo->metadata_size * 8) / in bbm_in_data_chunk()
287 j = (mtd->writesize * 8 - geo->metadata_size * 8) - in bbm_in_data_chunk()
347 geo->ecc_chunk_count = mtd->writesize / geo->eccn_chunk_size; in set_geometry_by_ecc_info()
397 geo->page_size = mtd->writesize + geo->metadata_size + in set_geometry_by_ecc_info()
400 geo->payload_size = mtd->writesize; in set_geometry_by_ecc_info()
410 block_mark_bit_offset = mtd->writesize * 8 - in set_geometry_by_ecc_info()
481 geo->ecc_chunk_count = mtd->writesize / geo->eccn_chunk_size; in set_geometry_for_large_oob()
501 geo->ecc_chunk_count = (mtd->writesize / geo->eccn_chunk_size) + 1; in set_geometry_for_large_oob()
511 bbm_chunk = (mtd->writesize * 8 - geo->metadata_size * 8 - in set_geometry_for_large_oob()
518 geo->page_size = mtd->writesize + geo->metadata_size + in set_geometry_for_large_oob()
[all …]
/linux/drivers/usb/
H A Dusb-skeleton.c366 size_t writesize = min_t(size_t, count, 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()
/linux/drivers/mtd/devices/
H A 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()

12345