Home
last modified time | relevance | path

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

123

/rk3399_rockchip-uboot/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 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_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 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()
H A Dmxs_nand.c193 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in mxs_nand_calc_ecc_layout_by_info()
221 geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; in mxs_nand_calc_ecc_layout()
596 (mtd->writesize + mtd->oobsize); in mxs_nand_ecc_read_page()
602 d->cmd.pio_words[3] = mtd->writesize + mtd->oobsize; in mxs_nand_ecc_read_page()
622 (mtd->writesize + mtd->oobsize); in mxs_nand_ecc_read_page()
694 memcpy(buf, nand_info->data_buf, mtd->writesize); in mxs_nand_ecc_read_page()
715 memcpy(nand_info->data_buf, buf, mtd->writesize); in mxs_nand_ecc_write_page()
740 d->cmd.pio_words[3] = (mtd->writesize + mtd->oobsize); in mxs_nand_ecc_write_page()
897 nand->cmdfunc(mtd, NAND_CMD_READ0, mtd->writesize, page); in mxs_nand_ecc_read_oob()
906 nand->cmdfunc(mtd, NAND_CMD_READ0, mtd->writesize, page); in mxs_nand_ecc_read_oob()
[all …]
H A Dfsl_ifc_nand.c238 ctrl->addr = priv->vbase + buf_num * (mtd->writesize * 2); in set_addr()
243 ctrl->index += mtd->writesize; in set_addr()
339 if (mtd->writesize > 512) { in fsl_ifc_do_read()
387 ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc()
403 ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_ifc_cmdfunc()
464 if (mtd->writesize > 512) { in fsl_ifc_cmdfunc()
503 if (column >= mtd->writesize) in fsl_ifc_cmdfunc()
511 if (column >= mtd->writesize) { in fsl_ifc_cmdfunc()
513 column -= mtd->writesize; in fsl_ifc_cmdfunc()
577 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_ifc_write_buf()
[all …]
H A Dpxa3xx_nand.c833 info->buf_count = mtd->writesize + mtd->oobsize; in prepare_start_command()
870 info->buf_start += mtd->writesize; in prepare_set_command()
891 } else if (mtd->writesize == info->chunk_size) { in prepare_set_command()
893 } else if (mtd->writesize > info->chunk_size) { in prepare_set_command()
901 set_command_address(info, mtd->writesize, column, page_addr); in prepare_set_command()
907 set_command_address(info, mtd->writesize, 0, page_addr); in prepare_set_command()
913 if (mtd->writesize > info->chunk_size) { in prepare_set_command()
924 (mtd->writesize + mtd->oobsize))) { in prepare_set_command()
938 if (mtd->writesize > info->chunk_size) { in prepare_set_command()
1229 chip->write_buf(mtd, buf, mtd->writesize); in pxa3xx_nand_write_page_hwecc()
[all …]
H A Dvf610_nfc.c388 column = mtd->writesize; in vf610_nfc_command()
397 trfr_sz += mtd->writesize + mtd->oobsize; in vf610_nfc_command()
469 l = min_t(uint, len, mtd->writesize + mtd->oobsize - c); in vf610_nfc_write_buf()
618 vf610_nfc_write_buf(mtd, buf, mtd->writesize); in vf610_nfc_write_page()
623 nfc->write_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_write_page()
704 if (mtd->writesize + mtd->oobsize > PAGE_2K + OOB_MAX - 8) { in vf610_nfc_nand_init()
711 if (mtd->writesize != PAGE_2K && mtd->oobsize < 64) { in vf610_nfc_nand_init()
717 if (chip->ecc.size != mtd->writesize) { in vf610_nfc_nand_init()
H A Dtegra_nand.c272 assert(mtd->writesize != 0); in nand_command()
273 column += mtd->writesize; in nand_command()
479 if (our_mtd->writesize == 512) in set_bus_width_page_size()
481 else if (our_mtd->writesize == 2048) in set_bus_width_page_size()
483 else if (our_mtd->writesize == 4096) in set_bus_width_page_size()
487 our_mtd->writesize); in set_bus_width_page_size()
843 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page); in nand_write_oob()
969 nand->ecc.size = our_mtd->writesize; in tegra_probe()
H A Drockchip_nand_v9.c294 chip->cmdfunc(mtd, NAND_CMD_RNDOUT, offset + mtd->writesize, -1); in rockchip_nand_read_extra_oob()
309 chip->cmdfunc(mtd, NAND_CMD_RNDIN, offset + mtd->writesize, -1); in rockchip_nand_write_extra_oob()
325 int offset = page * mtd->writesize; in rockchip_nand_hw_syndrome_pio_read_page()
379 int pages_per_block = mtd->erasesize / mtd->writesize; in rockchip_nand_make_bootrom_compat()
380 int offset = page * mtd->writesize; in rockchip_nand_make_bootrom_compat()
399 int offset = page * mtd->writesize; in rockchip_nand_hw_syndrome_pio_write_page()
488 ecc->steps = mtd->writesize / ecc->size; in rockchip_nand_hw_ecc_ctrl_init()
566 page += ((mtd->erasesize - mtd->writesize) >> chip->page_shift); in rockchip_nand_block_bad()
H A Drockchip_nand.c293 chip->cmdfunc(mtd, NAND_CMD_RNDOUT, offset + mtd->writesize, -1); in rockchip_nand_read_extra_oob()
308 chip->cmdfunc(mtd, NAND_CMD_RNDIN, offset + mtd->writesize, -1); in rockchip_nand_write_extra_oob()
324 int offset = page * mtd->writesize; in rockchip_nand_hw_syndrome_pio_read_page()
378 int pages_per_block = mtd->erasesize / mtd->writesize; in rockchip_nand_make_bootrom_compat()
379 int offset = page * mtd->writesize; in rockchip_nand_make_bootrom_compat()
398 int offset = page * mtd->writesize; in rockchip_nand_hw_syndrome_pio_write_page()
487 ecc->steps = mtd->writesize / ecc->size; in rockchip_nand_hw_ecc_ctrl_init()
565 page += ((mtd->erasesize - mtd->writesize) >> chip->page_shift); in rockchip_nand_block_bad()
H A Dzynq_nand.c457 chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page); in zynq_nand_write_oob()
490 chip->read_buf(mtd, buf, mtd->writesize); in zynq_nand_read_page_raw()
507 chip->read_buf(mtd, buf, mtd->writesize); in zynq_nand_read_page_raw_nooob()
538 chip->write_buf(mtd, buf, mtd->writesize); in zynq_nand_write_page_raw()
807 if ((mtd->writesize > ZYNQ_NAND_ECC_SIZE) && in zynq_nand_cmd_function()
809 column += mtd->writesize; in zynq_nand_cmd_function()
874 if (mtd->writesize > ZYNQ_NAND_ECC_SIZE) { in zynq_nand_cmd_function()
1168 nand_chip->ecc.size = mtd->writesize; in zynq_nand_init()
1197 switch (mtd->writesize) { in zynq_nand_init()
H A Dsunxi_nand.c448 writel(mtd->writesize, nfc->regs + NFC_REG_SPARE_AREA); in sunxi_nfc_select_chip()
688 int mod = mtd->erasesize / mtd->writesize; in sunxi_nfc_randomizer_state()
918 offset + mtd->writesize, -1); in sunxi_nfc_hw_ecc_read_extra_oob()
926 *cur_off = mtd->oobsize + mtd->writesize; in sunxi_nfc_hw_ecc_read_extra_oob()
999 offset + mtd->writesize, -1); in sunxi_nfc_hw_ecc_write_extra_oob()
1003 *cur_off = mtd->oobsize + mtd->writesize; in sunxi_nfc_hw_ecc_write_extra_oob()
1024 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_read_page()
1062 oob, oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_read_subpage()
1090 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_write_page()
1124 oob_off + mtd->writesize, in sunxi_nfc_hw_ecc_write_subpage()
[all …]
/rk3399_rockchip-uboot/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()
323 while (count && (off + mtd->writesize) <= mtd->size) { in raw_access()
339 .oobbuf = ((u8 *)addr) + mtd->writesize, in raw_access()
340 .len = mtd->writesize, 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()
/rk3399_rockchip-uboot/board/armltd/integrator/
H A Dlowlevel_init.S133 b writesize
139 b writesize
145 b writesize
151 b writesize
159 writesize: label
/rk3399_rockchip-uboot/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 …]
H A Donenand_bbt.c102 from + j * mtd->writesize + in create_bbt()
110 (&buf[j * scanlen], scanlen, mtd->writesize, bd)) { in create_bbt()
/rk3399_rockchip-uboot/env/
H A Donenand.c51 if (mtd->writesize) in env_onenand_load()
56 mtd->writesize = MAX_ONENAND_PAGESIZE; in env_onenand_load()
/rk3399_rockchip-uboot/drivers/mtd/nand/
H A Dbbt.c128 mtd->writesize - 1) >> mtd->writesize_shift; in nanddev_read_bbt()
130 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_read_bbt()
145 ops.len = bbt_page_num * mtd->writesize; in nanddev_read_bbt()
187 u8 *temp_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_read_bbt()
241 mtd->writesize - 1) >> mtd->writesize_shift; in nanddev_write_bbt()
244 data_buf = kzalloc(bbt_page_num * mtd->writesize, GFP_KERNEL); in nanddev_write_bbt()
270 ops.len = bbt_page_num * mtd->writesize; in nanddev_write_bbt()
/rk3399_rockchip-uboot/drivers/mtd/
H A Dmtdconcat.c176 if (mtd->writesize > 1) { in concat_writev()
178 if (do_div(__to, mtd->writesize) || (total_len % mtd->writesize)) in concat_writev()
725 concat->mtd.writesize = subdev[0]->writesize; in mtd_concat_create()
794 if (concat->mtd.writesize != subdev[i]->writesize || in mtd_concat_create()

123