Home
last modified time | relevance | path

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

1234

/drivers/mtd/devices/
Dgoldfish_nand.c94 rem = do_div(ofs, mtd->writesize); in goldfish_nand_erase()
97 ofs *= (mtd->writesize + mtd->oobsize); in goldfish_nand_erase()
99 if(len % mtd->writesize) in goldfish_nand_erase()
101 len = len / mtd->writesize * (mtd->writesize + mtd->oobsize); in goldfish_nand_erase()
128 if(ops->datbuf && ops->len && ops->len != mtd->writesize) in goldfish_nand_read_oob()
133 rem = do_div(ofs, mtd->writesize); in goldfish_nand_read_oob()
136 ofs *= (mtd->writesize + mtd->oobsize); in goldfish_nand_read_oob()
141 ofs += mtd->writesize + ops->ooboffs; in goldfish_nand_read_oob()
150 ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize); in goldfish_nand_read_oob()
161 if(ops->len && ops->len != mtd->writesize) in goldfish_nand_write_oob()
[all …]
Dsst25l.c264 if ((uint32_t)to % mtd->writesize) in sst25l_write()
273 for (i = 0; i < len; i += mtd->writesize) { in sst25l_write()
293 bytes = min_t(uint32_t, mtd->writesize, len - i); in sst25l_write()
384 flash->mtd.writesize = flash_info->page_size; in sst25l_probe()
/drivers/mtd/onenand/
Donenand_base.c418 if (addr & this->writesize) in onenand_command()
713 return this->writesize; in onenand_bufferram_offset()
854 if (addr & this->writesize) in onenand_get_2x_blockpage()
1098 this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize); in onenand_recover_lsb()
1123 int writesize = this->writesize; in onenand_mlc_read_ops_nolock() local
1149 thislen = min_t(int, writesize, len - read); in onenand_mlc_read_ops_nolock()
1151 column = from & (writesize - 1); in onenand_mlc_read_ops_nolock()
1152 if (column + thislen > writesize) in onenand_mlc_read_ops_nolock()
1153 thislen = writesize - column; in onenand_mlc_read_ops_nolock()
1156 this->command(mtd, ONENAND_CMD_READ, from, writesize); in onenand_mlc_read_ops_nolock()
[all …]
Dsamsung.c437 m += (this->writesize >> 2); in s3c_onenand_command()
441 mcount = mtd->writesize >> 2; in s3c_onenand_command()
508 p += this->writesize; in s3c_get_bufferram()
653 p += this->writesize; in s5pc110_read_bufferram()
659 !onenand->dma_addr || count != mtd->writesize) in s5pc110_read_bufferram()
701 if (count != mtd->writesize) { in s5pc110_read_bufferram()
703 memcpy(this->page_buf, p, mtd->writesize); in s5pc110_read_bufferram()
961 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
1011 this->subpagesize = mtd->writesize; in s3c_onenand_probe()
/drivers/mtd/nand/
Dmxc_nand.c442 if (nfc_is_v1() && mtd->writesize > 512) in send_page_v1_v2()
581 no_subpages = mtd->writesize >> 9; in mxc_nand_correct_data_v2_v3()
648 int n = mtd->oobsize + mtd->writesize - col; in mxc_nand_write_buf()
666 int n = mtd->oobsize + mtd->writesize - col; in mxc_nand_read_buf()
719 u16 n = mtd->writesize >> 9; in copy_spare()
720 u8 *d = host->data_buf + mtd->writesize; in copy_spare()
755 if (mtd->writesize > 512) in mxc_do_addr_cycle()
765 if (mtd->writesize > 512) { in mxc_do_addr_cycle()
795 oobbytes_per_512 = mtd->oobsize * 512 / mtd->writesize; in get_eccsize()
818 if (nfc_is_v21() && mtd->writesize) { in preset_v1_v2()
[all …]
Dfsl_ifc_nand.c182 ifc_nand_ctrl->addr = priv->vbase + buf_num * (mtd->writesize * 2); in set_addr()
187 ifc_nand_ctrl->index += mtd->writesize; in set_addr()
194 u8 __iomem *addr = priv->vbase + bufnum * (mtd->writesize * 2); in is_blank()
196 u8 __iomem *oob = addr + mtd->writesize; in is_blank()
199 for (i = 0; i < mtd->writesize / 4; i++) { in is_blank()
308 if (mtd->writesize > 512) { in fsl_ifc_do_read()
356 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc()
371 ifc_nand_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc()
421 if (mtd->writesize > 512) { in fsl_ifc_cmdfunc()
447 if (column >= mtd->writesize) in fsl_ifc_cmdfunc()
[all …]
Dnand_bbt.c208 "0x%012llx\n", from & ~mtd->writesize); in read_bbt()
212 "0x%012llx\n", from & ~mtd->writesize); in read_bbt()
317 ops.len = min(len, (size_t)mtd->writesize); in scan_read_raw_oob()
325 buf += mtd->oobsize + mtd->writesize; in scan_read_raw_oob()
326 len -= mtd->writesize; in scan_read_raw_oob()
327 offs += mtd->writesize; in scan_read_raw_oob()
362 ver_offs += mtd->writesize; in bbt_get_ver_offs()
384 mtd->writesize, td); in read_abs_bbts()
393 mtd->writesize, md); in read_abs_bbts()
414 if (check_pattern(buf, scanlen, mtd->writesize, bd)) in scan_block_full()
[all …]
Dnand_base.c340 ofs += mtd->erasesize - mtd->writesize; in nand_block_bad()
372 ofs += mtd->writesize; in nand_block_bad()
442 wr_ofs += mtd->erasesize - mtd->writesize; in nand_default_block_markbad()
449 wr_ofs += mtd->writesize; in nand_default_block_markbad()
573 if (column >= mtd->writesize) { in nand_command()
575 column -= mtd->writesize; in nand_command()
672 column += mtd->writesize; in nand_command_lp()
1076 chip->read_buf(mtd, buf, mtd->writesize); in nand_read_page_raw()
1217 chip->cmdfunc(mtd, NAND_CMD_RNDOUT, mtd->writesize, -1); in nand_read_subpage()
1234 mtd->writesize + aligned_pos, -1); in nand_read_subpage()
[all …]
Dcafe_nand.c182 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()
357 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page); in cafe_nand_write_oob()
391 chip->read_buf(mtd, buf, mtd->writesize); in cafe_nand_read_page()
525 chip->write_buf(mtd, buf, mtd->writesize); in cafe_nand_write_page_lowlevel()
573 if (chip->verify_buf(mtd, buf, mtd->writesize)) in cafe_nand_write_page()
766 if (mtd->writesize == 2048) in cafe_nand_probe()
[all …]
Dalauda.c228 usb_fill_bulk_urb(sg.urb[1], al->dev, al->bulk_in, buf, mtd->writesize, in __alauda_read_page()
293 usb_fill_bulk_urb(sg.urb[1], al->dev, al->write_out, buf,mtd->writesize, in alauda_write_page()
395 bounce_buf = kmalloc(mtd->writesize, GFP_KERNEL); in alauda_bounce_read()
403 size_t cplen = min(len, mtd->writesize - byte); in alauda_bounce_read()
443 buf += mtd->writesize; in alauda_read()
444 from += mtd->writesize; in alauda_read()
445 len -= mtd->writesize; in alauda_read()
484 buf += mtd->writesize; in alauda_write()
485 to += mtd->writesize; in alauda_write()
486 len -= mtd->writesize; in alauda_write()
[all …]
Dfsl_elbc_nand.c256 if (elbc_fcm_ctrl->read_bytes == mtd->writesize + mtd->oobsize) { in fsl_elbc_run_command()
337 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
353 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
421 if (column >= mtd->writesize) { in fsl_elbc_cmdfunc()
423 column -= mtd->writesize; in fsl_elbc_cmdfunc()
478 elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc()
537 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf()
711 mtd->writesize); in fsl_elbc_chip_init_tail()
716 if (mtd->writesize == 512) { in fsl_elbc_chip_init_tail()
719 } else if (mtd->writesize == 2048) { in fsl_elbc_chip_init_tail()
[all …]
Dmpc5121_nfc.c253 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()
619 mtd->writesize = rcw_pagesize; in mpc5121_nfc_read_hw_config()
813 switch (mtd->erasesize / mtd->writesize) { in mpc5121_nfc_probe()
Dbcm_umi_bch.c139 mtd->writesize + sectorIdx * sectorOobSize, -1); in bcm_umi_bch_read_page_hwecc()
140 nand_bcm_umi_bch_read_oobEcc(mtd->writesize, eccCalc, in bcm_umi_bch_read_page_hwecc()
208 nand_bcm_umi_bch_write_oobEcc(mtd->writesize, oobp, in bcm_umi_bch_write_page_hwecc()
Dsh_flctl.c407 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector()
541 flctl->read_bytes = mtd->writesize + mtd->oobsize; in flctl_cmdfunc()
557 set_addr(mtd, mtd->writesize, page_addr); in flctl_cmdfunc()
577 flctl->read_bytes = mtd->writesize + mtd->oobsize - column; in flctl_cmdfunc()
611 if (column >= mtd->writesize) { in flctl_cmdfunc()
612 column -= mtd->writesize; in flctl_cmdfunc()
638 if (flctl->seqin_column == mtd->writesize) in flctl_cmdfunc()
787 if (mtd->writesize == 512) { in flctl_chip_init_tail()
818 if (mtd->writesize == 512) { in flctl_chip_init_tail()
Ddenali.c1034 size_t size = denali->mtd.writesize + denali->mtd.oobsize; in write_page()
1048 memcpy(denali->buf.buf, buf, mtd->writesize); in write_page()
1052 memcpy(denali->buf.buf + mtd->writesize, in write_page()
1127 size_t size = denali->mtd.writesize + denali->mtd.oobsize; in denali_read_page()
1154 memcpy(buf, denali->buf.buf, mtd->writesize); in denali_read_page()
1164 if (!is_erased(buf, denali->mtd.writesize)) in denali_read_page()
1179 size_t size = denali->mtd.writesize + denali->mtd.oobsize; in denali_read_page_raw()
1206 memcpy(buf, denali->buf.buf, mtd->writesize); in denali_read_page_raw()
1207 memcpy(chip->oob_poi, denali->buf.buf + mtd->writesize, mtd->oobsize); in denali_read_page_raw()
1545 if (denali->mtd.writesize > NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE) { in denali_pci_probe()
[all …]
Dsm_common.c131 if (mtd->writesize == SM_SECTOR_SIZE) in sm_register_device()
133 else if (mtd->writesize == SM_SMALL_PAGE) in sm_register_device()
Dbcm_umi_nand.c453 switch (board_mtd->writesize) { /* writesize is the pagesize */ in bcm_umi_nand_probe()
466 board_mtd->writesize); in bcm_umi_nand_probe()
473 if (board_mtd->writesize > 512) { in bcm_umi_nand_probe()
/drivers/mtd/tests/
Dmtd_oobtest.c132 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in write_eraseblock()
185 for (i = 0; i < pgcnt; ++i, addr += mtd->writesize) { in verify_eraseblock()
393 pgcnt = mtd->erasesize / mtd->writesize; in mtd_oobtest_init()
399 mtd->writesize, ebcnt, pgcnt, mtd->oobsize); in mtd_oobtest_init()
571 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
591 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
615 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
635 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
662 addr = (i + 1) * mtd->erasesize - mtd->writesize; in mtd_oobtest_init()
680 addr += mtd->writesize; in mtd_oobtest_init()
[all …]
/drivers/mtd/nand/gpmi-nand/
Dgpmi-nand.c108 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in common_nfc_set_geometry()
117 geo->page_size = mtd->writesize + mtd->oobsize; in common_nfc_set_geometry()
118 geo->payload_size = mtd->writesize; in common_nfc_set_geometry()
181 block_mark_bit_offset = mtd->writesize * 8 - in common_nfc_set_geometry()
860 ret = read_page_prepare(this, buf, mtd->writesize, in gpmi_ecc_read_page()
874 read_page_end(this, buf, mtd->writesize, in gpmi_ecc_read_page()
923 read_page_swap_end(this, buf, mtd->writesize, in gpmi_ecc_read_page()
949 memcpy(this->payload_virt, buf, mtd->writesize); in gpmi_ecc_write_page()
967 buf, mtd->writesize, in gpmi_ecc_write_page()
998 send_page_end(this, buf, mtd->writesize, in gpmi_ecc_write_page()
[all …]
/drivers/usb/
Dusb-skeleton.c388 size_t writesize = min(count, (size_t)MAX_TRANSFER); in skel_write() local
431 buf = usb_alloc_coherent(dev->udev, writesize, GFP_KERNEL, in skel_write()
438 if (copy_from_user(buf, user_buffer, writesize)) { in skel_write()
454 buf, writesize, skel_write_bulk_callback, dev); in skel_write()
474 return writesize; in skel_write()
480 usb_free_coherent(dev->udev, writesize, buf, urb->transfer_dma); in skel_write()
/drivers/mtd/
Dmtdcore.c206 return snprintf(buf, PAGE_SIZE, "%lu\n", (unsigned long)mtd->writesize); in mtd_writesize_show()
209 static DEVICE_ATTR(writesize, S_IRUGO, mtd_writesize_show, NULL);
215 unsigned int subpagesize = mtd->writesize >> mtd->subpage_sft; in mtd_subpagesize_show()
310 BUG_ON(mtd->writesize == 0); in add_mtd_device()
330 if (is_power_of_2(mtd->writesize)) in add_mtd_device()
331 mtd->writesize_shift = ffs(mtd->writesize) - 1; in add_mtd_device()
1021 size_t min_alloc = max_t(size_t, mtd->writesize, PAGE_SIZE); in mtd_kmalloc_up_to()
1032 *size = ALIGN(*size, mtd->writesize); in mtd_kmalloc_up_to()
Dmtdconcat.c173 if (mtd->writesize > 1) { in concat_writev()
175 if (do_div(__to, mtd->writesize) || (total_len % mtd->writesize)) in concat_writev()
712 concat->mtd.writesize = subdev[0]->writesize; in mtd_concat_create()
775 if (concat->mtd.writesize != subdev[i]->writesize || in mtd_concat_create()
Dmtdswap.c403 offset = mtdswap_eb_offset(d, eb) + d->mtd->writesize; in mtdswap_write_marker()
935 ops.len = mtd->writesize; in mtdswap_eblk_passes()
941 mtd_pages = d->pages_per_eblk * PAGE_SIZE / mtd->writesize; in mtdswap_eblk_passes()
947 memset(d->page_buf, patt, mtd->writesize); in mtdswap_eblk_passes()
953 pos += mtd->writesize; in mtdswap_eblk_passes()
963 for (j = 0; j < mtd->writesize/sizeof(int); j++) in mtdswap_eblk_passes()
971 pos += mtd->writesize; in mtdswap_eblk_passes()
1444 if (PAGE_SIZE % mtd->writesize || mtd->writesize > PAGE_SIZE) { in mtdswap_add_mtd()
1446 " %u\n", MTDSWAP_PREFIX, PAGE_SIZE, mtd->writesize); in mtdswap_add_mtd()
/drivers/usb/serial/
Dsierra.c486 size_t writesize = min((size_t)count, (size_t)MAX_TRANSFER); in sierra_write() local
496 dev_dbg(&port->dev, "%s: write (%zd bytes)\n", __func__, writesize); in sierra_write()
518 buffer = kmalloc(writesize, GFP_ATOMIC); in sierra_write()
532 memcpy(buffer, buf, writesize); in sierra_write()
534 usb_serial_debug_data(debug, &port->dev, __func__, writesize, buffer); in sierra_write()
539 buffer, writesize, sierra_outdat_callback, port); in sierra_write()
571 return writesize; in sierra_write()
/drivers/usb/class/
Dcdc-acm.c675 count = (count > acm->writesize) ? acm->writesize : count; in acm_tty_write()
694 return acm_wb_is_avail(acm) ? acm->writesize : 0; in acm_tty_write_room()
709 return (ACM_NW - acm_wb_is_avail(acm)) * acm->writesize; in acm_tty_chars_in_buffer()
788 tmp.xmit_fifo_size = acm->writesize; in get_serial_info()
927 usb_free_coherent(usb_dev, acm->writesize, wb->buf, wb->dmah); in acm_write_buffers_free()
947 wb->buf = usb_alloc_coherent(acm->dev, acm->writesize, GFP_KERNEL, in acm_write_buffers_alloc()
953 usb_free_coherent(acm->dev, acm->writesize, in acm_write_buffers_alloc()
1193 acm->writesize = usb_endpoint_maxp(epwrite) * 20; in acm_probe()
1285 NULL, acm->writesize, acm_write_bulk, snd, epwrite->bInterval); in acm_probe()
1289 NULL, acm->writesize, acm_write_bulk, snd); in acm_probe()

1234