/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() 297 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in verify_eraseblock_in_one_go() 373 pgcnt = mtd->erasesize / mtd->writesize; in mtd_oobtest_init() 379 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() 597 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init() 617 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() [all …]
|
/drivers/mtd/onenand/ |
D | onenand_base.c | 417 if (addr & this->writesize) in onenand_command() 712 return this->writesize; in onenand_bufferram_offset() 853 if (addr & this->writesize) in onenand_get_2x_blockpage() 1097 this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize); in onenand_recover_lsb() 1122 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 …]
|
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 | 179 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in set_geometry_by_ecc_info() 229 geo->page_size = mtd->writesize + geo->metadata_size + in set_geometry_by_ecc_info() 233 if (geo->page_size < mtd->writesize + mtd->oobsize) { in set_geometry_by_ecc_info() 234 of->offset = geo->page_size - mtd->writesize; in set_geometry_by_ecc_info() 238 geo->payload_size = mtd->writesize; in set_geometry_by_ecc_info() 248 block_mark_bit_offset = mtd->writesize * 8 - in set_geometry_by_ecc_info() 282 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in legacy_set_geometry() 294 geo->page_size = mtd->writesize + mtd->oobsize; in legacy_set_geometry() 295 geo->payload_size = mtd->writesize; in legacy_set_geometry() 358 block_mark_bit_offset = mtd->writesize * 8 - in legacy_set_geometry() [all …]
|
/drivers/mtd/nand/ |
D | cafe_nand.c | 182 if (mtd->writesize > 512 && in cafe_nand_cmdfunc() 184 column += mtd->writesize; in cafe_nand_cmdfunc() 202 if (mtd->size > mtd->writesize << 16) in cafe_nand_cmdfunc() 222 cafe->datalen = mtd->writesize + mtd->oobsize - column; in cafe_nand_cmdfunc() 241 else if (command == NAND_CMD_READ0 && mtd->writesize > 512) in cafe_nand_cmdfunc() 351 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page); in cafe_nand_write_oob() 387 chip->read_buf(mtd, buf, mtd->writesize); in cafe_nand_read_page() 524 chip->write_buf(mtd, buf, mtd->writesize); in cafe_nand_write_page_lowlevel() 707 mtd->writesize + mtd->oobsize, in cafe_nand_probe() 735 if (mtd->writesize == 2048) in cafe_nand_probe() [all …]
|
D | mxc_nand.c | 569 if (mtd->writesize > 512) in send_page_v1() 697 no_subpages = mtd->writesize >> 9; in mxc_nand_correct_data_v2_v3() 768 int n = mtd->oobsize + mtd->writesize - col; in mxc_nand_write_buf() 786 int n = mtd->oobsize + mtd->writesize - col; in mxc_nand_read_buf() 856 u16 num_chunks = mtd->writesize / 512; in copy_spare() 858 u8 *d = host->data_buf + mtd->writesize; in copy_spare() 903 if (mtd->writesize > 512) in mxc_do_addr_cycle() 915 if (mtd->writesize > 512) { in mxc_do_addr_cycle() 955 oobbytes_per_512 = mtd->oobsize * 512 / mtd->writesize; in get_eccsize() 986 if (nand_chip->ecc.mode == NAND_ECC_HW && mtd->writesize) in preset_v1() [all …]
|
D | fsl_elbc_nand.c | 245 if (elbc_fcm_ctrl->read_bytes == mtd->writesize + mtd->oobsize) { in fsl_elbc_run_command() 331 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc() 347 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc() 415 if (column >= mtd->writesize) { in fsl_elbc_cmdfunc() 417 column -= mtd->writesize; in fsl_elbc_cmdfunc() 472 elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc() 531 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf() 668 mtd->writesize); in fsl_elbc_chip_init_tail() 673 if (mtd->writesize == 512) { in fsl_elbc_chip_init_tail() 676 } else if (mtd->writesize == 2048) { in fsl_elbc_chip_init_tail() [all …]
|
D | fsl_ifc_nand.c | 246 ifc_nand_ctrl->addr = priv->vbase + buf_num * (mtd->writesize * 2); in set_addr() 251 ifc_nand_ctrl->index += mtd->writesize; in set_addr() 258 u8 __iomem *addr = priv->vbase + bufnum * (mtd->writesize * 2); in is_blank() 260 u8 __iomem *oob = addr + mtd->writesize; in is_blank() 263 for (i = 0; i < mtd->writesize / 4; i++) { in is_blank() 378 if (mtd->writesize > 512) { in fsl_ifc_do_read() 428 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc() 443 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc() 506 if (mtd->writesize > 512) { in fsl_ifc_cmdfunc() 546 if (column >= mtd->writesize) in fsl_ifc_cmdfunc() [all …]
|
D | nand_base.c | 327 ofs += mtd->erasesize - mtd->writesize; in nand_block_bad() 359 ofs += mtd->writesize; in nand_block_bad() 401 ofs += mtd->erasesize - mtd->writesize; in nand_default_block_markbad() 408 ofs += mtd->writesize; in nand_default_block_markbad() 615 if (column >= mtd->writesize) { in nand_command() 617 column -= mtd->writesize; in nand_command() 717 column += mtd->writesize; in nand_command_lp() 1256 chip->read_buf(mtd, buf, mtd->writesize); in nand_read_page_raw() 1406 chip->cmdfunc(mtd, NAND_CMD_RNDOUT, mtd->writesize, -1); in nand_read_subpage() 1421 mtd->writesize + aligned_pos, -1); in nand_read_subpage() [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 | 254 if (mtd->writesize > 512) in mpc5121_nfc_addr_cycle() 386 if (mtd->writesize > 512) in mpc5121_nfc_command() 429 sbsize = (mtd->oobsize / (mtd->writesize / 512)) & ~1; in mpc5121_nfc_copy_spare() 467 if (prv->spareonly || c >= mtd->writesize) { in mpc5121_nfc_buf_copy() 469 if (c >= mtd->writesize) in mpc5121_nfc_buf_copy() 470 c -= mtd->writesize; in mpc5121_nfc_buf_copy() 481 l = min((uint)len, mtd->writesize - c); in mpc5121_nfc_buf_copy() 599 mtd->writesize = rcw_pagesize; in mpc5121_nfc_read_hw_config() 792 switch (mtd->erasesize / mtd->writesize) { in mpc5121_nfc_probe()
|
D | denali.c | 1065 size_t size = denali->mtd.writesize + denali->mtd.oobsize; in write_page() 1078 memcpy(denali->buf.buf, buf, mtd->writesize); in write_page() 1082 memcpy(denali->buf.buf + mtd->writesize, in write_page() 1163 size_t size = denali->mtd.writesize + denali->mtd.oobsize; in denali_read_page() 1190 memcpy(buf, denali->buf.buf, mtd->writesize); in denali_read_page() 1200 if (!is_erased(buf, denali->mtd.writesize)) in denali_read_page() 1214 size_t size = denali->mtd.writesize + denali->mtd.oobsize; in denali_read_page_raw() 1239 memcpy(buf, denali->buf.buf, mtd->writesize); in denali_read_page_raw() 1240 memcpy(chip->oob_poi, denali->buf.buf + mtd->writesize, mtd->oobsize); in denali_read_page_raw() 1488 denali->mtd.writesize + denali->mtd.oobsize, in denali_init() [all …]
|
D | pxa3xx_nand.c | 544 info->data_size = mtd->writesize; in pxa3xx_set_datasize() 937 info->buf_count = mtd->writesize + mtd->oobsize; in prepare_start_command() 975 info->buf_start += mtd->writesize; in prepare_set_command() 982 if (mtd->writesize == PAGE_CHUNK_SIZE) { in prepare_set_command() 984 } else if (mtd->writesize > PAGE_CHUNK_SIZE) { in prepare_set_command() 992 set_command_address(info, mtd->writesize, column, page_addr); in prepare_set_command() 998 set_command_address(info, mtd->writesize, 0, page_addr); in prepare_set_command() 1004 if (mtd->writesize > PAGE_CHUNK_SIZE) { in prepare_set_command() 1017 (mtd->writesize + mtd->oobsize))) { in prepare_set_command() 1023 if (mtd->writesize > PAGE_CHUNK_SIZE) { in prepare_set_command() [all …]
|
D | sh_flctl.c | 565 chip->read_buf(mtd, buf, mtd->writesize); in flctl_read_page_hwecc() 575 chip->write_buf(mtd, buf, mtd->writesize); in flctl_write_page_hwecc() 603 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector() 669 write_ec_fiforeg(flctl, 16, mtd->writesize + 16 * sector); in execmd_write_page_sector() 726 flctl->read_bytes = mtd->writesize + mtd->oobsize; in flctl_cmdfunc() 742 set_addr(mtd, mtd->writesize, page_addr); in flctl_cmdfunc() 762 flctl->read_bytes = mtd->writesize + mtd->oobsize - column; in flctl_cmdfunc() 796 if (column >= mtd->writesize) { in flctl_cmdfunc() 797 column -= mtd->writesize; in flctl_cmdfunc() 823 if (flctl->seqin_column == mtd->writesize) in flctl_cmdfunc() [all …]
|
D | hisi504_nand.c | 279 hinfc_write(host, mtd->writesize + mtd->oobsize, in hisi_nfc_send_cmd_readstart() 464 host->offset = column + mtd->writesize; in hisi_nfc_cmdfunc() 550 chip->read_buf(mtd, buf, mtd->writesize); in hisi_nand_read_page_hwecc() 596 chip->write_buf(mtd, buf, mtd->writesize); in hisi_nand_write_page_hwecc() 672 if (mtd->writesize == 2048) in hisi_nfc_ecc_probe() 773 host->buffer = dmam_alloc_coherent(dev, mtd->writesize + mtd->oobsize, in hisi_nfc_probe() 780 host->dma_oob = host->dma_buffer + mtd->writesize; in hisi_nfc_probe() 781 memset(host->buffer, 0xff, mtd->writesize + mtd->oobsize); in hisi_nfc_probe() 785 switch (mtd->writesize) { in hisi_nfc_probe()
|
D | vf610_nfc.c | 395 column = mtd->writesize; in vf610_nfc_command() 404 trfr_sz += mtd->writesize + mtd->oobsize; in vf610_nfc_command() 471 l = min_t(uint, len, mtd->writesize + mtd->oobsize - c); in vf610_nfc_write_buf() 611 vf610_nfc_write_buf(mtd, buf, mtd->writesize); in vf610_nfc_write_page() 617 nfc->write_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_write_page() 760 if (mtd->writesize + mtd->oobsize > PAGE_2K + OOB_MAX - 8) { in vf610_nfc_probe() 767 if (mtd->writesize != PAGE_2K && mtd->oobsize < 64) { in vf610_nfc_probe() 773 if (chip->ecc.size != mtd->writesize) { in vf610_nfc_probe()
|
D | sm_common.c | 123 if (mtd->writesize == SM_SECTOR_SIZE) in sm_register_device() 125 else if (mtd->writesize == SM_SMALL_PAGE) in sm_register_device()
|
D | sunxi_nand.c | 419 writel(mtd->writesize, nfc->regs + NFC_REG_SPARE_AREA); in sunxi_nfc_select_chip() 651 offset + mtd->writesize, -1); in sunxi_nfc_hw_ecc_read_extra_oob() 655 *cur_off = mtd->oobsize + mtd->writesize; in sunxi_nfc_hw_ecc_read_extra_oob() 715 offset + mtd->writesize, -1); in sunxi_nfc_hw_ecc_write_extra_oob() 719 *cur_off = mtd->oobsize + mtd->writesize; in sunxi_nfc_hw_ecc_write_extra_oob() 739 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_read_page() 770 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_write_page() 1074 nsectors = mtd->writesize / ecc->size; in sunxi_nand_hw_common_ecc_ctrl_init() 1115 nsectors = mtd->writesize / ecc->size; in sunxi_nand_hw_ecc_ctrl_init() 1170 nsectors = mtd->writesize / ecc->size; in sunxi_nand_hw_syndrome_ecc_ctrl_init()
|
D | lpc32xx_slc.c | 394 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page); in lpc32xx_nand_write_oob_syndrome() 508 memcpy(host->data_buf, buf, mtd->writesize); in lpc32xx_xfer() 526 writel(mtd->writesize, SLC_TC(host->io_base)); in lpc32xx_xfer() 536 mtd->writesize / chip->ecc.steps, dir); in lpc32xx_xfer() 594 memcpy(buf, host->data_buf, mtd->writesize); in lpc32xx_xfer() 879 if (mtd->writesize <= 512) in lpc32xx_nand_probe() 896 if (mtd->writesize <= 512) { in lpc32xx_nand_probe()
|
/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/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()
|
D | mtdcore.c | 186 return snprintf(buf, PAGE_SIZE, "%lu\n", (unsigned long)mtd->writesize); in mtd_writesize_show() 189 static DEVICE_ATTR(writesize, S_IRUGO, mtd_writesize_show, NULL); 195 unsigned int subpagesize = mtd->writesize >> mtd->subpage_sft; in mtd_subpagesize_show() 400 BUG_ON(mtd->writesize == 0); in add_mtd_device() 421 if (is_power_of_2(mtd->writesize)) in add_mtd_device() 422 mtd->writesize_shift = ffs(mtd->writesize) - 1; in add_mtd_device() 1228 size_t min_alloc = max_t(size_t, mtd->writesize, PAGE_SIZE); in mtd_kmalloc_up_to() 1239 *size = ALIGN(*size, mtd->writesize); in mtd_kmalloc_up_to()
|
/drivers/usb/serial/ |
D | sierra.c | 462 size_t writesize = min((size_t)count, (size_t)MAX_TRANSFER); in sierra_write() local 472 dev_dbg(&port->dev, "%s: write (%zd bytes)\n", __func__, writesize); in sierra_write() 494 buffer = kmalloc(writesize, GFP_ATOMIC); in sierra_write() 506 memcpy(buffer, buf, writesize); in sierra_write() 508 usb_serial_debug_data(&port->dev, __func__, writesize, buffer); in sierra_write() 513 buffer, writesize, sierra_outdat_callback, port); in sierra_write() 545 return writesize; in sierra_write()
|