/linux/drivers/mtd/tests/ |
A D | nandbiterrs.c | 108 ops.len = mtd->writesize; in rewrite_page() 117 if (err || ops.retlen != mtd->writesize) { in rewrite_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() 353 subsize = mtd->writesize >> mtd->subpage_sft; in mtd_nandbiterrs_init() 354 subcount = mtd->writesize / subsize; in mtd_nandbiterrs_init() [all …]
|
A D | oobtest.c | 64 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() 551 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 570 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 615 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 644 addr = (loff_t)(i + 1) * mtd->erasesize - mtd->writesize; in mtd_oobtest_init() 665 addr += mtd->writesize; in mtd_oobtest_init() [all …]
|
/linux/drivers/mtd/nand/onenand/ |
A D | onenand_base.c | 740 return this->writesize; in onenand_bufferram_offset() 1126 int writesize = this->writesize; in onenand_mlc_read_ops_nolock() local 1227 int writesize = this->writesize; in onenand_read_ops_nolock() local 1415 from += mtd->writesize; in onenand_read_oob_nolock() 2058 to += mtd->writesize; in onenand_write_oob_nolock() 2871 to += mtd->writesize; in onenand_otp_write_oob_nolock() 2945 len = mtd->writesize; in do_otp_write() 3073 from += mtd->writesize; in onenand_otp_walk() 3736 mtd->writesize <<= 1; in onenand_probe() 3756 this->writesize = mtd->writesize; in onenand_probe() [all …]
|
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() 895 this->subpagesize = mtd->writesize; in s3c_onenand_probe() 927 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
|
/linux/drivers/mtd/nand/raw/ |
A D | cadence-nand-controller.c | 1434 mtd->writesize in cadence_nand_write_page() 1487 mtd->writesize in cadence_nand_write_page() 1509 int writesize = mtd->writesize; in cadence_nand_write_page_raw() local 1539 if (pos >= writesize) in cadence_nand_write_page_raw() 1577 if (pos >= writesize) in cadence_nand_write_page_raw() 1598 mtd->writesize + in cadence_nand_write_page_raw() 1623 mtd->writesize in cadence_nand_read_page() 1703 int writesize = mtd->writesize; in cadence_nand_read_page_raw() local 1721 mtd->writesize in cadence_nand_read_page_raw() 1740 if (pos >= writesize) in cadence_nand_read_page_raw() [all …]
|
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()
|
A D | denali.c | 247 int writesize = mtd->writesize; in denali_payload_xfer() local 255 if (pos >= writesize) { 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 305 if (pos >= writesize) { in denali_oob_xfer() 314 buf += writesize - pos; in denali_oob_xfer() 315 len -= writesize - pos; in denali_oob_xfer() 316 pos = writesize + oob_skip; in denali_oob_xfer() [all …]
|
A D | mxc_nand.c | 300 if (mtd->writesize > 512) in mxc_do_addr_cycle() 312 if (mtd->writesize > 512) { in mxc_do_addr_cycle() 589 if (mtd->writesize > 512) in send_page_v1() 725 if (mtd->writesize > 512) in mxc_nand_read_page_v1() 784 if (mtd->writesize > 512) in mxc_nand_read_page_v2_v3() 1026 if (mtd->writesize <= 512) { in mxc_v1_ooblayout_free() 1075 if (mtd->writesize <= 512) { in mxc_v2_ooblayout_free() 1119 mtd->writesize) in preset_v1() 1226 if (mtd->writesize) { in preset_v2() 1293 if (mtd->writesize == 2048) { in preset_v3() [all …]
|
A D | fsl_elbc_nand.c | 97 if (mtd->writesize > 512) in fsl_elbc_ooblayout_free() 336 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() 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() 674 fsl_elbc_write_buf(chip, buf, mtd->writesize); in fsl_elbc_write_subpage() 803 mtd->writesize); in fsl_elbc_attach_chip() 808 if (mtd->writesize == 512) { in fsl_elbc_attach_chip() 811 } else if (mtd->writesize == 2048) { in fsl_elbc_attach_chip() [all …]
|
A D | nand_base.c | 1101 if (mtd->writesize <= 512 && offset_in_page >= mtd->writesize) in nand_fill_column_cycles() 1121 if (mtd->writesize <= 512) in nand_fill_column_cycles() 1234 if (mtd->writesize > 512) in nand_read_page_op() 1325 if (mtd->writesize <= 512) in nand_change_read_column_op() 1443 if (mtd->writesize <= 512) { in nand_exec_prog_page_op() 1634 if (mtd->writesize <= 512) in nand_change_write_column_op() 3539 if (mtd->writesize > 512) in nand_read_oob_syndrome() 3614 if (mtd->writesize <= 512) { in nand_write_oob_syndrome() 4234 int bytes = mtd->writesize; in nand_do_write_ops() 6077 ecc->size, mtd->writesize); in nand_scan_tail() [all …]
|
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() 381 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in cafe_nand_read_page() 613 if (mtd->writesize == 2048) in cafe_nand_attach_chip() 618 if (mtd->writesize == 2048) { in cafe_nand_attach_chip() 621 } else if (mtd->writesize == 512) { in cafe_nand_attach_chip() 627 mtd->writesize); in cafe_nand_attach_chip() [all …]
|
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() 858 len = ALIGN(len, mtd->writesize); in write_bbt() [all …]
|
A D | mpc5121_nfc.c | 240 if (mtd->writesize > 512) in mpc5121_nfc_addr_cycle() 374 if (mtd->writesize > 512) in mpc5121_nfc_command() 417 sbsize = (mtd->oobsize / (mtd->writesize / 512)) & ~1; in mpc5121_nfc_copy_spare() 455 if (prv->spareonly || c >= mtd->writesize) { in mpc5121_nfc_buf_copy() 457 if (c >= mtd->writesize) in mpc5121_nfc_buf_copy() 458 c -= mtd->writesize; in mpc5121_nfc_buf_copy() 469 l = min((uint)len, mtd->writesize - c); in mpc5121_nfc_buf_copy() 577 mtd->writesize = rcw_pagesize; in mpc5121_nfc_read_hw_config() 789 switch (mtd->erasesize / mtd->writesize) { in mpc5121_nfc_probe()
|
A D | fsl_ifc_nand.c | 105 if (mtd->writesize == 512 && in fsl_ifc_ooblayout_free() 158 ifc_nand_ctrl->index += mtd->writesize; in set_addr() 258 if (mtd->writesize > 512) { in fsl_ifc_do_read() 308 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc() 386 if (mtd->writesize > 512) { in fsl_ifc_cmdfunc() 426 if (column >= mtd->writesize) in fsl_ifc_cmdfunc() 434 if (column >= mtd->writesize) { in fsl_ifc_cmdfunc() 436 column -= mtd->writesize; in fsl_ifc_cmdfunc() 512 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_ifc_write_buf() 674 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in fsl_ifc_read_page() [all …]
|
A D | rockchip-nand-controller.c | 516 pages_per_blk = mtd->erasesize / mtd->writesize; 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() 655 mtd->writesize, DMA_TO_DEVICE); in rk_nfc_write_page_hwecc() 706 pages_per_blk = mtd->erasesize / mtd->writesize; in rk_nfc_read_page_raw() 770 mtd->writesize, in rk_nfc_read_page_hwecc() 845 memcpy(buf, nfc->page_buf, mtd->writesize); in rk_nfc_read_page_hwecc() 982 ecc->steps = mtd->writesize / ecc->size; in rk_nfc_ecc_init() 1005 ecc->steps = mtd->writesize / ecc->size; in rk_nfc_ecc_init() [all …]
|
A D | vf610_nfc.c | 553 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()
|
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()
|
A D | sh_flctl.c | 604 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in flctl_read_page_hwecc() 615 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in flctl_write_page_hwecc() 643 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector() 709 write_ec_fiforeg(flctl, 16, mtd->writesize + 16 * sector); in execmd_write_page_sector() 767 flctl->read_bytes = mtd->writesize + mtd->oobsize; in flctl_cmdfunc() 783 set_addr(mtd, mtd->writesize, page_addr); in flctl_cmdfunc() 837 if (column >= mtd->writesize) { in flctl_cmdfunc() 838 column -= mtd->writesize; in flctl_cmdfunc() 864 if (flctl->seqin_column == mtd->writesize) in flctl_cmdfunc() 998 if (mtd->writesize == 512) { in flctl_chip_attach_chip() [all …]
|
A D | mtk_nand.c | 326 if (!mtd->writesize) in mtk_nfc_hw_runtime_config() 331 switch (mtd->writesize) { in mtk_nfc_hw_runtime_config() 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() 1156 eccsteps = mtd->writesize / chip->ecc.size; in mtk_nfc_ooblayout_free() 1177 eccsteps = mtd->writesize / chip->ecc.size; in mtk_nfc_ooblayout_ecc() 1212 if (mtd->writesize == 512) { in mtk_nfc_set_bad_mark_ctl() 1216 bm_ctl->sec = mtd->writesize / mtk_data_len(nand); in mtk_nfc_set_bad_mark_ctl() 1228 eccsteps = mtd->writesize / nand->ecc.size; in mtk_nfc_set_spare_per_sector() 1279 if (mtd->writesize > 512 && in mtk_nfc_ecc_init() [all …]
|
A D | nand_samsung.c | 27 mtd->writesize = memorg->pagesize; in samsung_nand_decode_id() 125 if (mtd->writesize > 512) in samsung_nand_init()
|
A D | intel-nand-controller.c | 397 ret = ebu_dma_start(ebu_host, DMA_DEV_TO_MEM, buf, mtd->writesize); in ebu_nand_read_page_hwecc() 422 ret = ebu_dma_start(ebu_host, DMA_MEM_TO_DEV, buf, mtd->writesize); in ebu_nand_write_page_hwecc() 455 u32 writesize = mtd->writesize; in ebu_nand_attach_chip() local 492 ecc_steps = writesize / ecc_size; in ebu_nand_attach_chip() 498 pagesize = fls(writesize >> 11); in ebu_nand_attach_chip() 502 pg_per_blk = fls((blocksize / writesize) >> 6) / 8; in ebu_nand_attach_chip()
|
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()
|
/linux/drivers/mtd/nand/raw/gpmi-nand/ |
A D | gpmi-nand.c | 352 geo->payload_size = mtd->writesize; in set_geometry_by_ecc_info() 362 block_mark_bit_offset = mtd->writesize * 8 - in set_geometry_by_ecc_info() 442 geo->payload_size = mtd->writesize; in legacy_set_geometry() 505 block_mark_bit_offset = mtd->writesize * 8 - in legacy_set_geometry() 1589 mtd->writesize + mtd->oobsize); in gpmi_ecc_read_page_raw() 1601 swap(tmp_buf[0], tmp_buf[mtd->writesize]); in gpmi_ecc_read_page_raw() 1638 tmp_buf + mtd->writesize + oob_byte_off, in gpmi_ecc_read_page_raw() 1711 memcpy(tmp_buf + mtd->writesize + oob_byte_off, in gpmi_ecc_write_page_raw() 1722 swap(tmp_buf[0], tmp_buf[mtd->writesize]); in gpmi_ecc_write_page_raw() 1725 mtd->writesize + mtd->oobsize); in gpmi_ecc_write_page_raw() [all …]
|
/linux/drivers/usb/ |
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/devices/ |
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()
|