Home
last modified time | relevance | path

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

1234567

/OK3568_Linux_fs/kernel/drivers/mtd/tests/
H A Dnandbiterrs.c95 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 …]
H A Doobtest.c64 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()
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()
600 err = mtd_write_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
620 err = mtd_read_oob(mtd, mtd->size - mtd->writesize, &ops); in mtd_oobtest_init()
650 addr = (loff_t)(i + 1) * mtd->erasesize - mtd->writesize; in mtd_oobtest_init()
[all …]
/OK3568_Linux_fs/u-boot/drivers/mtd/nand/raw/
H A Dmxs_nand_spl.c115 mtd->writesize = le32_to_cpu(p->byte_per_page); in mxs_flash_onfi_ident()
116 mtd->erasesize = le32_to_cpu(p->pages_per_block) * mtd->writesize; in mxs_flash_onfi_ident()
121 chip->page_shift = ffs(mtd->writesize) - 1; in mxs_flash_onfi_ident()
128 debug("writesize=%d (>>%d)\n", mtd->writesize, chip->page_shift); in mxs_flash_onfi_ident()
170 chip->cmdfunc(mtd, NAND_CMD_READ0, mtd->writesize, page); in is_badblock()
202 nand_chip.oob_poi = nand_chip.buffers->databuf + mtd->writesize; in nand_init()
220 nand_page_per_block = mtd->erasesize / mtd->writesize; in nand_spl_load_image()
224 size = roundup(size, mtd->writesize); in nand_spl_load_image()
228 sz += mtd->writesize; in nand_spl_load_image()
229 offs += mtd->writesize; in nand_spl_load_image()
[all …]
H A Ddenali.c636 int writesize = mtd->writesize; in denali_oob_xfer() local
643 size_t size = writesize + oobsize; in denali_oob_xfer()
647 chip->cmdfunc(mtd, start_cmd, writesize, page); in denali_oob_xfer()
659 if (pos >= writesize) in denali_oob_xfer()
661 else if (pos + len > writesize) in denali_oob_xfer()
662 len = writesize - pos; in denali_oob_xfer()
672 chip->cmdfunc(mtd, rnd_cmd, writesize + oob_skip, -1); in denali_oob_xfer()
694 int writesize = mtd->writesize; in denali_read_page_raw() local
701 size_t size = writesize + oobsize; in denali_read_page_raw()
714 if (pos >= writesize) in denali_read_page_raw()
[all …]
H A Dmxc_nand.c398 chip->cmdfunc(mtd, NAND_CMD_READOOB, mtd->writesize, page);
422 mtd->writesize + chip->ecc.prepad, page);
458 host->col_addr = mtd->writesize + n * eccpitch;
506 host->col_addr = mtd->writesize + n * eccpitch;
534 chip->cmdfunc(mtd, NAND_CMD_READOOB, mtd->writesize, page);
538 host->col_addr = mtd->writesize +
557 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page);
592 host->col_addr = mtd->writesize + n * eccpitch;
636 host->col_addr = mtd->writesize + n * eccpitch;
665 int subpages = mtd->writesize / nand_chip->subpagesize;
[all …]
H A Dnand_base.c355 ofs += mtd->erasesize - mtd->writesize; in nand_block_bad()
378 ofs += mtd->writesize; in nand_block_bad()
415 ofs += mtd->erasesize - mtd->writesize; in nand_default_block_markbad()
422 ofs += mtd->writesize; in nand_default_block_markbad()
620 if (column >= mtd->writesize) { in nand_command()
622 column -= mtd->writesize; in nand_command()
721 column += mtd->writesize; in nand_command_lp()
1102 if (offset_in_page + len > mtd->writesize + mtd->oobsize) in nand_read_page_op()
1164 if (offset_in_page + len > mtd->writesize + mtd->oobsize) in nand_change_read_column_op()
1229 if (offset_in_page + len > mtd->writesize + mtd->oobsize) in nand_prog_page_begin_op()
[all …]
H A Dnand_bbt.c200 from & ~mtd->writesize); in read_bbt()
204 from & ~mtd->writesize); in read_bbt()
324 ops.len = min(len, (size_t)mtd->writesize); in scan_read_oob()
335 buf += mtd->oobsize + mtd->writesize; in scan_read_oob()
336 len -= mtd->writesize; in scan_read_oob()
337 offs += mtd->writesize; in scan_read_oob()
372 ver_offs += mtd->writesize; in bbt_get_ver_offs()
394 mtd->writesize, td); in read_abs_bbts()
403 mtd->writesize, md); in read_abs_bbts()
436 offs += mtd->writesize; in scan_block_fast()
[all …]
H A Dfsl_elbc_nand.c307 ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
322 ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
408 if (column >= mtd->writesize) { in fsl_elbc_cmdfunc()
410 column -= mtd->writesize; in fsl_elbc_cmdfunc()
437 ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc()
495 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf()
601 fsl_elbc_read_buf(mtd, buf, mtd->writesize); in fsl_elbc_read_page()
617 fsl_elbc_write_buf(mtd, buf, mtd->writesize); in fsl_elbc_write_page()
632 fsl_elbc_write_buf(mtd, buf, mtd->writesize); in fsl_elbc_write_subpage()
757 if (mtd->writesize == 2048) { in fsl_elbc_chip_init()
[all …]
H A Dnand_util.c277 if ((offset & (mtd->writesize - 1)) != 0) { in nand_get_lock_status()
455 l = (l + mtd->writesize - 1) / mtd->writesize; in drop_ffs()
456 l *= mtd->writesize; in drop_ffs()
483 size_t verlen = mtd->writesize + mtd->oobsize; in nand_verify_page_oob()
492 vops.oobbuf = vops.datbuf + mtd->writesize; in nand_verify_page_oob()
523 size_t verlen = mtd->writesize; in nand_verify()
532 verlen = min(mtd->writesize, (uint32_t)(ofs + len - verofs)); in nand_verify()
597 if ((offset & (mtd->writesize - 1)) != 0) { in nand_write_skip_bad()
/OK3568_Linux_fs/kernel/drivers/rkflash/
H A Dsfc_nand_mtd_bbt.c65 mtd->writesize - 1) >> mtd->writesize_shift; in nanddev_read_bbt()
67 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_read_bbt()
82 ops.len = bbt_page_num * mtd->writesize; in nanddev_read_bbt()
88 temp_buf = kzalloc(mtd->writesize + mtd->oobsize, GFP_KERNEL); in nanddev_read_bbt()
105 memcpy(ops.datbuf + i * mtd->writesize, temp_buf, mtd->writesize); in nanddev_read_bbt()
106 memcpy(ops.oobbuf + i * mtd->oobsize, temp_buf + mtd->writesize, mtd->oobsize); in nanddev_read_bbt()
149 mtd->writesize - 1) >> mtd->writesize_shift; in nanddev_write_bbt()
152 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_write_bbt()
175 ops.len = bbt_page_num * mtd->writesize; in nanddev_write_bbt()
180 temp_buf = kzalloc(mtd->writesize + mtd->oobsize, GFP_KERNEL); in nanddev_write_bbt()
[all …]
H A Dsfc_nand_mtd.c58 memcpy(p_dev->dma_buf, data, mtd->writesize); in sfc_nand_write_mtd()
59 memset(p_dev->dma_buf + mtd->writesize, 0xff, mtd->oobsize); in sfc_nand_write_mtd()
69 data += mtd->writesize; in sfc_nand_write_mtd()
70 ops->retlen += mtd->writesize; in sfc_nand_write_mtd()
71 remaining -= mtd->writesize; in sfc_nand_write_mtd()
72 to += mtd->writesize; in sfc_nand_write_mtd()
100 real_size = min_t(u32, remaining, mtd->writesize - off); in sfc_nand_read_mtd()
359 nand->mtd.writesize = p_dev->page_size * SFC_NAND_SECTOR_SIZE; in sfc_nand_mtd_init()
373 nand->mtd.writesize_shift = ffs(nand->mtd.writesize) - 1; in sfc_nand_mtd_init()
/OK3568_Linux_fs/kernel/drivers/mtd/nand/onenand/
H A Donenand_base.c445 if (addr & this->writesize) in onenand_command()
740 return this->writesize; in onenand_bufferram_offset()
881 if (addr & this->writesize) in onenand_get_2x_blockpage()
1101 this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize); in onenand_recover_lsb()
1126 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 …]
/OK3568_Linux_fs/u-boot/cmd/
H A Dmtd.c22 do_div(len, mtd->writesize); in mtd_len_to_pages()
29 return !do_div(size, mtd->writesize); in mtd_is_aligned_with_min_io_size()
64 u64 data_off = page * mtd->writesize; in mtd_dump_device_buf()
67 mtd->writesize, start_off + data_off); in mtd_dump_device_buf()
69 mtd->writesize, start_off + data_off); in mtd_dump_device_buf()
145 printf(" - min I/O: 0x%x bytes\n", mtd->writesize); in mtd_show_device()
217 io_op->retlen = mtd->writesize; in mtd_special_write_oob()
300 mtd->writesize); in do_mtd()
304 default_len = dump ? mtd->writesize : mtd->size; in do_mtd()
308 len = round_up(len, mtd->writesize); in do_mtd()
[all …]
H A Dnand.c50 off = last + mtd->writesize; in nand_dump()
54 datbuf = memalign(ARCH_DMA_MINALIGN, mtd->writesize); in nand_dump()
66 off &= ~(mtd->writesize - 1); in nand_dump()
72 ops.len = mtd->writesize; in nand_dump()
84 i = mtd->writesize >> 4; in nand_dump()
300 printf(" Page size %8d b\n", mtd->writesize); in nand_print_and_set_info()
308 env_set_hex("nand_writesize", mtd->writesize); in nand_print_and_set_info()
322 .oobbuf = ((u8 *)addr) + mtd->writesize, in raw_access()
323 .len = mtd->writesize, in raw_access()
342 addr += mtd->writesize + mtd->oobsize; in raw_access()
[all …]
H A Donenand.c112 .len = mtd->writesize, in onenand_write_oneblock_withoob()
117 for (page = 0; page < (mtd->erasesize / mtd->writesize); page ++) { in onenand_write_oneblock_withoob()
119 buf += mtd->writesize; in onenand_write_oneblock_withoob()
125 to += mtd->writesize; in onenand_write_oneblock_withoob()
142 if ((to & (mtd->writesize - 1)) != 0) { in onenand_block_write()
312 datbuf = malloc(mtd->writesize + mtd->oobsize); in onenand_dump()
318 off &= ~(mtd->writesize - 1); in onenand_dump()
323 ops.len = mtd->writesize; in onenand_dump()
334 i = mtd->writesize >> 4; in onenand_dump()
/OK3568_Linux_fs/kernel/drivers/mtd/nand/
H A Dbbt_store.c45 mtd->writesize - 1) >> (ffs(mtd->writesize) - 1); in nanddev_read_bbt()
47 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_read_bbt()
62 ops.len = bbt_page_num * mtd->writesize; in nanddev_read_bbt()
115 mtd->writesize - 1) >> (ffs(mtd->writesize) - 1); in nanddev_write_bbt()
118 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_write_bbt()
142 ops.len = bbt_page_num * mtd->writesize; in nanddev_write_bbt()
/OK3568_Linux_fs/u-boot/drivers/mtd/onenand/
H A Donenand_base.c521 return mtd->writesize; in onenand_bufferram_offset()
624 if (addr & this->writesize) in onenand_get_2x_blockpage()
835 this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize); in onenand_recover_lsb()
859 int writesize = this->writesize; in onenand_read_ops_nolock() local
888 this->command(mtd, ONENAND_CMD_READ, from, writesize); in onenand_read_ops_nolock()
898 thislen = min_t(int, writesize, len - read); in onenand_read_ops_nolock()
899 column = from & (writesize - 1); in onenand_read_ops_nolock()
900 if (column + thislen > writesize) in onenand_read_ops_nolock()
901 thislen = writesize - column; in onenand_read_ops_nolock()
908 this->command(mtd, ONENAND_CMD_READ, from, writesize); in onenand_read_ops_nolock()
[all …]
/OK3568_Linux_fs/kernel/drivers/mtd/nand/raw/
H A Dcadence-nand-controller.c1231 last_sec_size = mtd->writesize + mtd->oobsize; in cadence_nand_prepare_data_size()
1234 offset = mtd->writesize + cdns_chip->bbm_offs; in cadence_nand_prepare_data_size()
1434 mtd->writesize in cadence_nand_write_page()
1443 memset(cdns_ctrl->buf + mtd->writesize, 0xFF, in cadence_nand_write_page()
1451 if (cadence_nand_dma_buf_ok(cdns_ctrl, buf, mtd->writesize) && in cadence_nand_write_page()
1458 oob = cdns_ctrl->buf + mtd->writesize; in cadence_nand_write_page()
1463 mtd->writesize, in cadence_nand_write_page()
1476 memcpy(cdns_ctrl->buf + mtd->writesize, chip->oob_poi, in cadence_nand_write_page()
1480 memcpy(cdns_ctrl->buf, buf, mtd->writesize); in cadence_nand_write_page()
1487 mtd->writesize in cadence_nand_write_page()
[all …]
H A Dnand_micron.c233 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 Ddenali.c204 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 Dmxc_nand.c255 u16 num_chunks = mtd->writesize / 512; in copy_spare()
302 if (mtd->writesize > 512) in mxc_do_addr_cycle()
314 if (mtd->writesize > 512) { in mxc_do_addr_cycle()
591 if (mtd->writesize > 512) in send_page_v1()
727 if (mtd->writesize > 512) in mxc_nand_read_page_v1()
730 no_subpages = mtd->writesize >> 9; in mxc_nand_read_page_v1()
764 memcpy32_fromio(buf, host->main_area0, mtd->writesize); in mxc_nand_read_page_v1()
786 if (mtd->writesize > 512) in mxc_nand_read_page_v2_v3()
793 memcpy32_fromio(buf, host->main_area0, mtd->writesize); in mxc_nand_read_page_v2_v3()
800 no_subpages = mtd->writesize >> 9; in mxc_nand_read_page_v2_v3()
[all …]
H A Dfsl_elbc_nand.c98 if (mtd->writesize > 512) in fsl_elbc_ooblayout_free()
252 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()
362 elbc_fcm_ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc()
430 if (column >= mtd->writesize) { in fsl_elbc_cmdfunc()
432 column -= mtd->writesize; in fsl_elbc_cmdfunc()
487 elbc_fcm_ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc()
546 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf()
641 nand_read_page_op(chip, page, 0, buf, mtd->writesize); in fsl_elbc_read_page()
659 nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize); in fsl_elbc_write_page()
[all …]
H A Dnand_base.c52 int lastpage = (mtd->erasesize / mtd->writesize) - 1; in nand_pairing_dist3_get_info()
72 int lastpair = ((mtd->erasesize / mtd->writesize) - 1) / 2; in nand_pairing_dist3_get_wunit()
87 if (page >= mtd->erasesize / mtd->writesize) in nand_pairing_dist3_get_wunit()
228 int last_page = ((mtd->erasesize - mtd->writesize) >> in nand_bbm_get_next_page()
478 ofs + (page_offset * mtd->writesize), in nand_default_block_markbad()
969 if (offset_in_page > mtd->writesize + mtd->oobsize) in nand_fill_column_cycles()
977 if (mtd->writesize <= 512 && offset_in_page >= mtd->writesize) in nand_fill_column_cycles()
978 offset_in_page -= mtd->writesize; in nand_fill_column_cycles()
997 if (mtd->writesize <= 512) in nand_fill_column_cycles()
1027 if (offset_in_page >= mtd->writesize) in nand_sp_exec_read_page_op()
[all …]
H A Dcafe_nand.c185 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 …]
/OK3568_Linux_fs/u-boot/board/armltd/integrator/
H A Dlowlevel_init.S133 b writesize
139 b writesize
145 b writesize
151 b writesize
159 writesize: label

1234567