| /linux/drivers/mtd/tests/ |
| H A D | nandbiterrs.c | 95 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 D | hugetlb_dio.c | 29 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/raw/ |
| H A D | mxc_nand.c | 254 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 D | nand_micron.c | 233 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 D | denali.c | 204 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 D | fsl_elbc_nand.c | 97 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 D | cafe_nand.c | 185 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 D | mpc5121_nfc.c | 240 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 D | nand_bbt.c | 197 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 D | fsl_ifc_nand.c | 106 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 D | vf610_nfc.c | 554 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 D | hisi504_nand.c | 268 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 D | sh_flctl.c | 605 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 D | mtk_nand.c | 325 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 D | nand_samsung.c | 27 mtd->writesize = memorg->pagesize; in samsung_nand_decode_id() 125 if (mtd->writesize > 512) in samsung_nand_init()
|
| H A D | intel-nand-controller.c | 394 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()
|
| H A D | nuvoton-ma35d1-nand-controller.c | 241 nand->buffer = devm_kzalloc(dev, mtd->writesize, GFP_KERNEL); in ma35_nand_hwecc_init() 254 chip->ecc.steps = mtd->writesize / chip->ecc.size; in ma35_nand_hwecc_init() 440 if (len != mtd->writesize) { in ma35_nand_do_write() 484 if (len != mtd->writesize) { in ma35_nand_do_read() 539 memset(nand->buffer, 0xff, mtd->writesize); in ma35_nand_format_subpage() 571 ma35_nand_do_write(chip, nand->buffer, mtd->writesize); in ma35_nand_write_subpage_hwecc() 611 ma35_nand_do_write(chip, buf, mtd->writesize); in ma35_nand_write_page_hwecc() 642 memset((void *)buf, 0xff, mtd->writesize); in ma35_nand_read_subpage_hwecc() 674 memset((void *)buf, 0xff, mtd->writesize); in ma35_nand_read_page_hwecc() 677 bitflips = ma35_nand_do_read(chip, buf, mtd->writesize); in ma35_nand_read_page_hwecc() [all …]
|
| H A D | nand_legacy.c | 260 if (column >= mtd->writesize) { in nand_command() 262 column -= mtd->writesize; in nand_command() 396 column += mtd->writesize; in nand_command_lp() 619 if (mtd->writesize > 512 && chip->legacy.cmdfunc == nand_command) in nand_legacy_adjust_cmdfunc()
|
| H A D | sm_common.c | 171 if (mtd->writesize == SM_SECTOR_SIZE) in sm_attach_chip() 173 else if (mtd->writesize == SM_SMALL_PAGE) in sm_attach_chip()
|
| H A D | meson_nand.c | 320 int len = mtd->writesize, pagesize, pages; in meson_nfc_cmd_access() 330 len = mtd->writesize + mtd->oobsize; in meson_nfc_cmd_access() 334 pages = mtd->writesize / 512; in meson_nfc_cmd_access() 710 if (mtd->writesize <= 512) { in meson_nfc_rw_cmd_prepare_and_execute() 759 data_len = mtd->writesize + mtd->oobsize; in meson_nfc_write_page_sub() 800 memcpy(meson_chip->data_buf, buf, mtd->writesize); in meson_nfc_write_page_hwecc() 838 data_len = mtd->writesize + mtd->oobsize; in meson_nfc_read_page_sub() 895 memset(buf, 0xff, mtd->writesize); in meson_nfc_read_page_hwecc() 924 memcpy(buf, meson_chip->data_buf, mtd->writesize); in meson_nfc_read_page_hwecc() 1228 nsectors = mtd->writesize / nand->ecc.size; in meson_chip_buffer_init() [all …]
|
| /linux/drivers/usb/ |
| H A D | usb-skeleton.c | 366 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/nand/onenand/ |
| H A D | onenand_samsung.c | 413 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/devices/ |
| H A D | sst25l.c | 256 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()
|
| /linux/drivers/mtd/ |
| H A D | mtdconcat.c | 200 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()
|
| /linux/include/linux/mtd/ |
| H A D | mtd.h | 255 uint32_t writesize; member 622 do_div(sz, mtd->writesize); in mtd_div_by_ws() 630 return do_div(sz, mtd->writesize); in mtd_mod_by_ws() 637 return master->erasesize / mtd->writesize; in mtd_wunit_per_eb() 648 return base + (wunit * mtd->writesize); in mtd_wunit_to_offset()
|