/drivers/mtd/tests/ |
D | nandbiterrs.c | 108 return mtdtest_write(mtd, offset, mtd->writesize, wbuffer); in write_page() 121 ops.len = mtd->writesize; in rewrite_page() 130 if (err || ops.retlen != mtd->writesize) { in rewrite_page() 153 err = mtd_read(mtd, offset, mtd->writesize, &read, rbuffer); in read_page() 157 if (err < 0 || read != mtd->writesize) { in read_page() 174 for (i = 0; i < mtd->writesize; i++) { in verify_page() 197 while (byte < mtd->writesize) { in insert_biterror() 221 for (i = 0; i < mtd->writesize; i++) in incremental_errors_test() 284 for (i = 0; i < mtd->writesize; i++) in overwrite_test() 364 mtd->writesize, mtd->oobsize); in mtd_nandbiterrs_init() [all …]
|
D | oobtest.c | 76 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in write_eraseblock() 186 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in verify_eraseblock() 306 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in verify_eraseblock_in_one_go() 382 pgcnt = mtd->erasesize / mtd->writesize; in mtd_oobtest_init() 388 mtd->writesize, ebcnt, pgcnt, mtd->oobsize); in mtd_oobtest_init() 565 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 585 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 612 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 632 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 662 addr = (loff_t)(i + 1) * mtd->erasesize - mtd->writesize; in mtd_oobtest_init() [all …]
|
/drivers/mtd/nand/ |
D | denali.c | 676 int writesize = mtd->writesize; in denali_oob_xfer() local 683 size_t size = writesize + oobsize; in denali_oob_xfer() 687 chip->cmdfunc(mtd, start_cmd, writesize, page); in denali_oob_xfer() 699 if (pos >= writesize) in denali_oob_xfer() 701 else if (pos + len > writesize) in denali_oob_xfer() 702 len = writesize - pos; in denali_oob_xfer() 712 chip->cmdfunc(mtd, rnd_cmd, writesize + oob_skip, -1); in denali_oob_xfer() 734 int writesize = mtd->writesize; in denali_read_page_raw() local 741 size_t size = writesize + oobsize; in denali_read_page_raw() 754 if (pos >= writesize) in denali_read_page_raw() [all …]
|
D | mxc_nand.c | 502 if (mtd->writesize > 512) in send_page_v1() 630 no_subpages = mtd->writesize >> 9; in mxc_nand_correct_data_v2_v3() 701 int n = mtd->oobsize + mtd->writesize - col; in mxc_nand_write_buf() 719 int n = mtd->oobsize + mtd->writesize - col; in mxc_nand_read_buf() 789 u16 num_chunks = mtd->writesize / 512; in copy_spare() 791 u8 *d = host->data_buf + mtd->writesize; in copy_spare() 836 if (mtd->writesize > 512) in mxc_do_addr_cycle() 848 if (mtd->writesize > 512) { in mxc_do_addr_cycle() 904 if (mtd->writesize <= 512) { in mxc_v1_ooblayout_free() 953 if (mtd->writesize <= 512) { in mxc_v2_ooblayout_free() [all …]
|
D | cafe_nand.c | 187 if (mtd->writesize > 512 && in cafe_nand_cmdfunc() 189 column += mtd->writesize; in cafe_nand_cmdfunc() 207 if (mtd->size > mtd->writesize << 16) in cafe_nand_cmdfunc() 227 cafe->datalen = mtd->writesize + mtd->oobsize - column; in cafe_nand_cmdfunc() 246 else if (command == NAND_CMD_READ0 && mtd->writesize > 512) in cafe_nand_cmdfunc() 358 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page); in cafe_nand_write_oob() 394 chip->read_buf(mtd, buf, mtd->writesize); in cafe_nand_read_page() 552 chip->write_buf(mtd, buf, mtd->writesize); in cafe_nand_write_page_lowlevel() 736 mtd->writesize + mtd->oobsize, in cafe_nand_probe() 764 if (mtd->writesize == 2048) in cafe_nand_probe() [all …]
|
D | fsl_elbc_nand.c | 111 if (mtd->writesize > 512) in fsl_elbc_ooblayout_free() 265 if (elbc_fcm_ctrl->read_bytes == mtd->writesize + mtd->oobsize) { in fsl_elbc_run_command() 351 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc() 367 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc() 435 if (column >= mtd->writesize) { in fsl_elbc_cmdfunc() 437 column -= mtd->writesize; in fsl_elbc_cmdfunc() 492 elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc() 551 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf() 688 mtd->writesize); in fsl_elbc_chip_init_tail() 693 if (mtd->writesize == 512) { in fsl_elbc_chip_init_tail() [all …]
|
D | nand_base.c | 436 ofs += mtd->erasesize - mtd->writesize; in nand_block_bad() 488 ofs += mtd->erasesize - mtd->writesize; in nand_default_block_markbad() 495 ofs += mtd->writesize; in nand_default_block_markbad() 699 if (column >= mtd->writesize) { in nand_command() 701 column -= mtd->writesize; in nand_command() 832 column += mtd->writesize; in nand_command_lp() 1400 chip->read_buf(mtd, buf, mtd->writesize); in nand_read_page_raw() 1553 chip->cmdfunc(mtd, NAND_CMD_RNDOUT, mtd->writesize, -1); in nand_read_subpage() 1569 mtd->writesize + aligned_pos, -1); in nand_read_subpage() 1881 col = (int)(from & (mtd->writesize - 1)); in nand_do_read_ops() [all …]
|
D | nand_bbt.c | 202 from & ~mtd->writesize); in read_bbt() 206 from & ~mtd->writesize); in read_bbt() 326 ops.len = min(len, (size_t)mtd->writesize); in scan_read_oob() 337 buf += mtd->oobsize + mtd->writesize; in scan_read_oob() 338 len -= mtd->writesize; in scan_read_oob() 339 offs += mtd->writesize; in scan_read_oob() 374 ver_offs += mtd->writesize; in bbt_get_ver_offs() 396 mtd->writesize, td); in read_abs_bbts() 405 mtd->writesize, md); in read_abs_bbts() 438 offs += mtd->writesize; in scan_block_fast() [all …]
|
D | mpc5121_nfc.c | 253 if (mtd->writesize > 512) in mpc5121_nfc_addr_cycle() 385 if (mtd->writesize > 512) in mpc5121_nfc_command() 428 sbsize = (mtd->oobsize / (mtd->writesize / 512)) & ~1; in mpc5121_nfc_copy_spare() 466 if (prv->spareonly || c >= mtd->writesize) { in mpc5121_nfc_buf_copy() 468 if (c >= mtd->writesize) in mpc5121_nfc_buf_copy() 469 c -= mtd->writesize; in mpc5121_nfc_buf_copy() 480 l = min((uint)len, mtd->writesize - c); in mpc5121_nfc_buf_copy() 598 mtd->writesize = rcw_pagesize; in mpc5121_nfc_read_hw_config() 789 switch (mtd->erasesize / mtd->writesize) { in mpc5121_nfc_probe()
|
D | fsl_ifc_nand.c | 118 if (mtd->writesize == 512 && in fsl_ifc_ooblayout_free() 166 ifc_nand_ctrl->addr = priv->vbase + buf_num * (mtd->writesize * 2); in set_addr() 171 ifc_nand_ctrl->index += mtd->writesize; in set_addr() 271 if (mtd->writesize > 512) { in fsl_ifc_do_read() 321 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc() 336 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc() 399 if (mtd->writesize > 512) { in fsl_ifc_cmdfunc() 439 if (column >= mtd->writesize) in fsl_ifc_cmdfunc() 447 if (column >= mtd->writesize) { in fsl_ifc_cmdfunc() 449 column -= mtd->writesize; in fsl_ifc_cmdfunc() [all …]
|
D | pxa3xx_nand.c | 332 int nchunks = mtd->writesize / info->chunk_size; in pxa3xx_ooblayout_ecc() 350 int nchunks = mtd->writesize / info->chunk_size; in pxa3xx_ooblayout_free() 365 if (mtd->writesize == 4096 && info->chunk_size == 2048) { in pxa3xx_ooblayout_free() 974 info->buf_count = mtd->writesize + mtd->oobsize; in prepare_start_command() 1012 info->buf_start += mtd->writesize; in prepare_set_command() 1027 if (mtd->writesize == PAGE_CHUNK_SIZE) { in prepare_set_command() 1029 } else if (mtd->writesize > PAGE_CHUNK_SIZE) { in prepare_set_command() 1037 set_command_address(info, mtd->writesize, column, page_addr); in prepare_set_command() 1043 set_command_address(info, mtd->writesize, 0, page_addr); in prepare_set_command() 1049 if (mtd->writesize > PAGE_CHUNK_SIZE) { in prepare_set_command() [all …]
|
D | mtk_nand.c | 323 if (!mtd->writesize) in mtk_nfc_hw_runtime_config() 328 switch (mtd->writesize) { in mtk_nfc_hw_runtime_config() 354 dev_err(nfc->dev, "invalid page len: %d\n", mtd->writesize); in mtk_nfc_hw_runtime_config() 614 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_format_subpage() 644 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_format_page() 781 memcpy(nfc->buffer, buf, mtd->writesize); in mtk_nfc_write_page() 791 len = mtd->writesize + (raw ? mtd->oobsize : 0); in mtk_nfc_write_page() 984 return mtk_nfc_read_subpage(mtd, chip, 0, mtd->writesize, p, pg, 0); in mtk_nfc_read_page_hwecc() 995 memset(nfc->buffer, 0xff, mtd->writesize + mtd->oobsize); in mtk_nfc_read_page_raw() 996 ret = mtk_nfc_read_subpage(mtd, chip, 0, mtd->writesize, nfc->buffer, in mtk_nfc_read_page_raw() [all …]
|
D | hisi504_nand.c | 277 hinfc_write(host, mtd->writesize + mtd->oobsize, in hisi_nfc_send_cmd_readstart() 462 host->offset = column + mtd->writesize; in hisi_nfc_cmdfunc() 548 chip->read_buf(mtd, buf, mtd->writesize); in hisi_nand_read_page_hwecc() 594 chip->write_buf(mtd, buf, mtd->writesize); in hisi_nand_write_page_hwecc() 688 if (mtd->writesize == 2048) in hisi_nfc_ecc_probe() 782 host->buffer = dmam_alloc_coherent(dev, mtd->writesize + mtd->oobsize, in hisi_nfc_probe() 789 host->dma_oob = host->dma_buffer + mtd->writesize; in hisi_nfc_probe() 790 memset(host->buffer, 0xff, mtd->writesize + mtd->oobsize); in hisi_nfc_probe() 794 switch (mtd->writesize) { in hisi_nfc_probe()
|
D | vf610_nfc.c | 367 column = mtd->writesize; in vf610_nfc_command() 376 trfr_sz += mtd->writesize + mtd->oobsize; in vf610_nfc_command() 443 l = min_t(uint, len, mtd->writesize + mtd->oobsize - c); in vf610_nfc_write_buf() 583 vf610_nfc_write_buf(mtd, buf, mtd->writesize); in vf610_nfc_write_page() 589 nfc->write_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_write_page() 732 if (mtd->writesize + mtd->oobsize > PAGE_2K + OOB_MAX - 8) { in vf610_nfc_probe() 739 if (mtd->writesize != PAGE_2K && mtd->oobsize < 64) { in vf610_nfc_probe() 745 if (chip->ecc.size != mtd->writesize) { in vf610_nfc_probe()
|
D | sh_flctl.c | 617 chip->read_buf(mtd, buf, mtd->writesize); in flctl_read_page_hwecc() 627 chip->write_buf(mtd, buf, mtd->writesize); in flctl_write_page_hwecc() 655 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector() 721 write_ec_fiforeg(flctl, 16, mtd->writesize + 16 * sector); in execmd_write_page_sector() 778 flctl->read_bytes = mtd->writesize + mtd->oobsize; in flctl_cmdfunc() 794 set_addr(mtd, mtd->writesize, page_addr); in flctl_cmdfunc() 814 flctl->read_bytes = mtd->writesize + mtd->oobsize - column; in flctl_cmdfunc() 848 if (column >= mtd->writesize) { in flctl_cmdfunc() 849 column -= mtd->writesize; in flctl_cmdfunc() 875 if (flctl->seqin_column == mtd->writesize) in flctl_cmdfunc() [all …]
|
D | nand_samsung.c | 30 mtd->writesize = 2048 << (extid & 0x03); in samsung_nand_decode_id() 101 if (mtd->writesize > 512) in samsung_nand_init()
|
D | sm_common.c | 184 if (mtd->writesize == SM_SECTOR_SIZE) in sm_register_device() 186 else if (mtd->writesize == SM_SMALL_PAGE) in sm_register_device()
|
D | sunxi_nand.c | 499 writel(mtd->writesize, nfc->regs + NFC_REG_SPARE_AREA); in sunxi_nfc_select_chip() 1042 offset + mtd->writesize, -1); in sunxi_nfc_hw_ecc_read_extra_oob() 1051 *cur_off = mtd->oobsize + mtd->writesize; in sunxi_nfc_hw_ecc_read_extra_oob() 1120 mtd->writesize + oob_off, -1); in sunxi_nfc_hw_ecc_read_chunks_dma() 1156 mtd->writesize + oob_off, -1); in sunxi_nfc_hw_ecc_read_chunks_dma() 1232 offset + mtd->writesize, -1); in sunxi_nfc_hw_ecc_write_extra_oob() 1237 *cur_off = mtd->oobsize + mtd->writesize; in sunxi_nfc_hw_ecc_write_extra_oob() 1258 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_read_page() 1313 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_read_subpage() 1361 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_write_page() [all …]
|
/drivers/mtd/onenand/ |
D | onenand_base.c | 450 if (addr & this->writesize) in onenand_command() 745 return this->writesize; in onenand_bufferram_offset() 886 if (addr & this->writesize) in onenand_get_2x_blockpage() 1111 this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize); in onenand_recover_lsb() 1136 int writesize = this->writesize; in onenand_mlc_read_ops_nolock() local 1158 thislen = min_t(int, writesize, len - read); in onenand_mlc_read_ops_nolock() 1160 column = from & (writesize - 1); in onenand_mlc_read_ops_nolock() 1161 if (column + thislen > writesize) in onenand_mlc_read_ops_nolock() 1162 thislen = writesize - column; in onenand_mlc_read_ops_nolock() 1165 this->command(mtd, ONENAND_CMD_READ, from, writesize); in onenand_mlc_read_ops_nolock() [all …]
|
D | samsung.c | 420 m += (this->writesize >> 2); in s3c_onenand_command() 424 mcount = mtd->writesize >> 2; in s3c_onenand_command() 491 p += this->writesize; in s3c_get_bufferram() 636 p += this->writesize; in s5pc110_read_bufferram() 642 !onenand->dma_addr || count != mtd->writesize) in s5pc110_read_bufferram() 684 if (count != mtd->writesize) { in s5pc110_read_bufferram() 686 memcpy(this->page_buf, p, mtd->writesize); in s5pc110_read_bufferram() 938 this->subpagesize = mtd->writesize; in s3c_onenand_probe() 988 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
|
/drivers/mtd/nand/gpmi-nand/ |
D | gpmi-nand.c | 61 oobregion->length = geo->page_size - mtd->writesize; in gpmi_ooblayout_ecc() 77 if (geo->page_size < mtd->writesize + mtd->oobsize) { in gpmi_ooblayout_free() 78 oobregion->offset = geo->page_size - mtd->writesize; in gpmi_ooblayout_free() 240 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in set_geometry_by_ecc_info() 290 geo->page_size = mtd->writesize + geo->metadata_size + in set_geometry_by_ecc_info() 293 geo->payload_size = mtd->writesize; in set_geometry_by_ecc_info() 303 block_mark_bit_offset = mtd->writesize * 8 - in set_geometry_by_ecc_info() 337 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in legacy_set_geometry() 350 geo->page_size = mtd->writesize + geo->metadata_size + in legacy_set_geometry() 352 geo->payload_size = mtd->writesize; in legacy_set_geometry() [all …]
|
/drivers/usb/ |
D | usb-skeleton.c | 367 size_t writesize = min(count, (size_t)MAX_TRANSFER); in skel_write() local 410 buf = usb_alloc_coherent(dev->udev, writesize, GFP_KERNEL, in skel_write() 417 if (copy_from_user(buf, user_buffer, writesize)) { in skel_write() 433 buf, writesize, skel_write_bulk_callback, dev); in skel_write() 454 return writesize; in skel_write() 460 usb_free_coherent(dev->udev, writesize, buf, urb->transfer_dma); in skel_write()
|
/drivers/mtd/devices/ |
D | sst25l.c | 263 if ((uint32_t)to % mtd->writesize) in sst25l_write() 272 for (i = 0; i < len; i += mtd->writesize) { in sst25l_write() 292 bytes = min_t(uint32_t, mtd->writesize, len - i); in sst25l_write() 382 flash->mtd.writesize = flash_info->page_size; in sst25l_probe()
|
/drivers/usb/serial/ |
D | sierra.c | 445 size_t writesize = min((size_t)count, (size_t)MAX_TRANSFER); in sierra_write() local 455 dev_dbg(&port->dev, "%s: write (%zd bytes)\n", __func__, writesize); in sierra_write() 477 buffer = kmalloc(writesize, GFP_ATOMIC); in sierra_write() 489 memcpy(buffer, buf, writesize); in sierra_write() 491 usb_serial_debug_data(&port->dev, __func__, writesize, buffer); in sierra_write() 496 buffer, writesize, sierra_outdat_callback, port); in sierra_write() 528 return writesize; in sierra_write()
|
/drivers/mtd/ |
D | mtdconcat.c | 173 if (mtd->writesize > 1) { in concat_writev() 175 if (do_div(__to, mtd->writesize) || (total_len % mtd->writesize)) in concat_writev() 713 concat->mtd.writesize = subdev[0]->writesize; in mtd_concat_create() 766 if (concat->mtd.writesize != subdev[i]->writesize || in mtd_concat_create()
|