/u-boot/drivers/mtd/nand/raw/ |
A D | nand_bch.c | 157 if (mtd->oobsize < 64) { in nand_bch_init() 159 "oobsize %d\n", mtd->oobsize); in nand_bch_init() 167 if (layout->eccbytes+2 > mtd->oobsize) { in nand_bch_init() 169 "for oobsize %d eccbytes %u\n", mtd->oobsize, in nand_bch_init() 175 layout->eccpos[i] = mtd->oobsize-layout->eccbytes+i; in nand_bch_init() 178 layout->oobfree[0].length = mtd->oobsize-2-layout->eccbytes; in nand_bch_init()
|
A D | vf610_nfc.c | 389 trfr_sz += mtd->oobsize; in vf610_nfc_command() 399 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() 573 vf610_nfc_read_buf(mtd, oob, mtd->oobsize); in vf610_nfc_correct_data() 587 memset(oob, 0xff, mtd->oobsize); in vf610_nfc_correct_data() 599 vf610_nfc_read_buf(mtd, chip->oob_poi, mtd->oobsize); in vf610_nfc_read_page() 622 vf610_nfc_write_buf(mtd, chip->oob_poi, mtd->oobsize); in vf610_nfc_write_page() 625 nfc->write_sz = mtd->writesize + mtd->oobsize; in vf610_nfc_write_page() 702 if (mtd->writesize != PAGE_2K && mtd->oobsize < 64) { in vf610_nfc_nand_init() 716 if (mtd->oobsize > 64) in vf610_nfc_nand_init() [all …]
|
A D | mxs_nand.c | 173 if (geo->ecc_chunkn_size < mtd->oobsize) in mxs_nand_calc_ecc_layout_by_info() 206 if (geo->ecc_chunkn_size < mtd->oobsize) { in mxs_nand_legacy_calc_ecc_layout() 706 (mtd->writesize + mtd->oobsize); in mxs_nand_ecc_read_page() 738 (mtd->writesize + mtd->oobsize); in mxs_nand_ecc_read_page() 817 memset(nand->oob_poi, 0xff, mtd->oobsize); in mxs_nand_ecc_read_page() 1127 if (mtd->oobsize > 1024 || chip->ecc_step_ds < mtd->oobsize) in mxs_nand_set_geometry() 1155 nand_info->oobsize = mtd->oobsize; in mxs_nand_setup_ecc() 1175 tmp = (mtd->writesize + mtd->oobsize) in mxs_nand_setup_ecc() 1505 mtd->oobsize = 1862 - 1024; in mxs_nand_mode_fcb_62bit() 1542 mtd->oobsize = 1576 - 1024; in mxs_nand_mode_fcb_40bit() [all …]
|
A D | omap_gpmc.c | 733 if ((3 * eccsteps) + BADBLOCK_MARKER_LENGTH > oobsize) { in omap_select_ecc_scheme() 757 ecclayout->oobfree[0].length = oobsize - ecclayout->eccbytes - in omap_select_ecc_scheme() 765 if ((13 * eccsteps) + BADBLOCK_MARKER_LENGTH > oobsize) { in omap_select_ecc_scheme() 809 if ((14 * eccsteps) + BADBLOCK_MARKER_LENGTH > oobsize) { in omap_select_ecc_scheme() 844 if ((26 * eccsteps) + BADBLOCK_MARKER_LENGTH > oobsize) { in omap_select_ecc_scheme() 865 ecclayout->oobfree[0].length = oobsize - nand->ecc.bytes - in omap_select_ecc_scheme() 913 mtd->writesize, mtd->oobsize); in omap_nand_switch_ecc() 917 mtd->writesize, mtd->oobsize); in omap_nand_switch_ecc() 921 mtd->writesize, mtd->oobsize); in omap_nand_switch_ecc() 930 mtd->writesize, mtd->oobsize); in omap_nand_switch_ecc() [all …]
|
A D | zynq_nand.c | 451 chip->read_buf(mtd, p, (mtd->oobsize - data_width)); in zynq_nand_read_oob() 452 p += mtd->oobsize - data_width; in zynq_nand_read_oob() 478 buf += mtd->oobsize - data_width; in zynq_nand_write_oob() 511 chip->read_buf(mtd, p, (mtd->oobsize - data_width)); in zynq_nand_read_page_raw() 512 p += (mtd->oobsize - data_width); in zynq_nand_read_page_raw() 559 chip->write_buf(mtd, p, (mtd->oobsize - data_width)); in zynq_nand_write_page_raw() 560 p += (mtd->oobsize - data_width); in zynq_nand_write_page_raw() 625 oob_ptr += (mtd->oobsize - data_width); in zynq_nand_write_page_hwecc() 716 oob_ptr += (mtd->oobsize - data_width); in zynq_nand_read_page_hwecc() 1258 if (mtd->oobsize == 16) in zynq_nand_probe() [all …]
|
A D | denali.c | 617 int oobsize = mtd->oobsize; in denali_oob_xfer() local 623 size_t size = writesize + oobsize; in denali_oob_xfer() 662 len = oobsize - (bufpoi - chip->oob_poi); in denali_oob_xfer() 675 int oobsize = mtd->oobsize; in denali_read_page_raw() local 681 size_t size = writesize + oobsize; in denali_read_page_raw() 738 len = oobsize - (oob - chip->oob_poi); in denali_read_page_raw() 806 int oobsize = mtd->oobsize; in denali_write_page_raw() local 812 size_t size = writesize + oobsize; in denali_write_page_raw() 872 len = oobsize - (oob - chip->oob_poi); in denali_write_page_raw() 1111 int oobavail = mtd->oobsize - denali->oob_skip_bytes; in denali_ecc_setup() [all …]
|
A D | mxs_nand_spl.c | 128 mtd->oobsize = le16_to_cpu(p->spare_bytes_per_page); in mxs_flash_onfi_ident() 140 debug("oobsize=%d\n", mtd->oobsize); in mxs_flash_onfi_ident() 182 memset(chip->oob_poi, 0, mtd->oobsize); in is_badblock() 183 chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); in is_badblock()
|
A D | nand_base.c | 2567 mtd->oobsize); in nand_write_oob_std() 4195 mtd->oobsize = 128; in nand_decode_ext_id() 4198 mtd->oobsize = 218; in nand_decode_ext_id() 4201 mtd->oobsize = 400; in nand_decode_ext_id() 4204 mtd->oobsize = 436; in nand_decode_ext_id() 4207 mtd->oobsize = 512; in nand_decode_ext_id() 4241 mtd->oobsize = 64; in nand_decode_ext_id() 4244 mtd->oobsize = 32; in nand_decode_ext_id() 4247 mtd->oobsize = 16; in nand_decode_ext_id() 4376 mtd->oobsize = type->oobsize; in find_full_id_nand() [all …]
|
A D | fsl_elbc_nand.c | 308 ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc() 320 out_be32(&lbc->fbcr, mtd->oobsize - column); in fsl_elbc_cmdfunc() 323 ctrl->read_bytes = mtd->writesize + mtd->oobsize; in fsl_elbc_cmdfunc() 438 ctrl->index != mtd->writesize + mtd->oobsize) in fsl_elbc_cmdfunc() 496 unsigned int bufsize = mtd->writesize + mtd->oobsize; in fsl_elbc_write_buf() 603 fsl_elbc_read_buf(mtd, chip->oob_poi, mtd->oobsize); in fsl_elbc_read_page() 619 fsl_elbc_write_buf(mtd, chip->oob_poi, mtd->oobsize); in fsl_elbc_write_page() 634 fsl_elbc_write_buf(mtd, chip->oob_poi, mtd->oobsize); in fsl_elbc_write_subpage()
|
A D | octeontx_nand.c | 429 oobregion->length = mtd->oobsize - ecc->total - 2; in nand_ooblayout_free_lp() 455 int oobsize = mtd->oobsize; in octeontx_nand_calc_ecc_layout() local 468 if (layout->eccbytes + 2 > oobsize) { in octeontx_nand_calc_ecc_layout() 470 oobsize, layout->eccbytes); in octeontx_nand_calc_ecc_layout() 1259 if (rc < mtd->oobsize) in octeontx_nand_cmdfunc() 1271 mtd->writesize + mtd->oobsize); in octeontx_nand_cmdfunc() 1273 if (rc < mtd->writesize + mtd->oobsize) in octeontx_nand_cmdfunc() 1728 int length = mtd->oobsize; in octeontx_nand_write_oob_std() 1766 chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); in octeontx_nand_read_oob_std() 1776 int oobchunk = mtd->oobsize / nsteps; in octeontx_nand_calc_bch_ecc_strength() [all …]
|
A D | nand_bbt.c | 323 ops.ooblen = mtd->oobsize; in scan_read_oob() 338 buf += mtd->oobsize + mtd->writesize; in scan_read_oob() 362 ops.ooblen = mtd->oobsize; in scan_write_bbt() 420 ops.ooblen = mtd->oobsize; in scan_block_fast() 530 int scanlen = mtd->writesize + mtd->oobsize; in search_bbt() 633 ops.ooblen = mtd->oobsize; in write_bbt() 732 ops.ooblen = (len >> this->page_shift) * mtd->oobsize; in write_bbt() 743 ooboffs = len + (pageoffs * mtd->oobsize); in write_bbt() 767 (len >> this->page_shift)* mtd->oobsize); in write_bbt() 1109 len += (len >> this->page_shift) * mtd->oobsize; in nand_scan_bbt() [all …]
|
A D | mxc_nand.c | 391 int length = mtd->oobsize; 425 length = mtd->oobsize - chip->ecc.prepad; 474 size = mtd->oobsize - (oob - chip->oob_poi); 529 n = mtd->oobsize - (oob - chip->oob_poi); 554 int length = mtd->oobsize; 609 size = mtd->oobsize - (oob - chip->oob_poi); 654 i = mtd->oobsize - (oob - chip->oob_poi); 834 n = mtd->writesize + mtd->oobsize - col; 868 m += mtd->oobsize; 905 n = mtd->writesize + mtd->oobsize - col; [all …]
|
A D | lpc32xx_nand_slc.c | 311 int tmp = (len != mtd->oobsize) ? mtd->oobsize : 0; in lpc32xx_nand_xfer() 435 lpc32xx_dma_read_buf(mtd, chip->oob_poi, mtd->oobsize); in lpc32xx_read_page_hwecc() 476 lpc32xx_dma_write_buf(mtd, chip->oob_poi, mtd->oobsize); in lpc32xx_write_page_hwecc()
|
A D | cortina_nand.c | 374 (mtd->oobsize - 1) << 22); in ca_nand_command() 409 (mtd->oobsize - 1) << 22); in ca_nand_command() 821 tx_desc[dma_index].buf_len = mtd->oobsize; in nand_rw_page() 823 rx_desc[dma_index].buf_len = mtd->oobsize; in nand_rw_page() 1088 for (rw_index = 0; rw_index < mtd->oobsize / 4; rw_index++) { in nand_rw_oob() 1252 if (mtd->oobsize < eccoob.eccbytes) { in nand_config_oob_layout() 1261 ecc_start_offset = mtd->oobsize - eccoob.eccbytes; in nand_config_oob_layout() 1274 mtd->oobsize - eccoob.eccbytes - eccoob.oobfree[0].offset - 1; in nand_config_oob_layout() 1368 printf("OOB Size: %dB\n", our_mtd->oobsize); in ca_nand_probe()
|
A D | atmel_nand.c | 97 int oobsize, int ecc_len) in pmecc_config_ecc_layout() argument 105 layout->eccpos[i] = oobsize - ecc_len + i; in pmecc_config_ecc_layout() 109 oobsize - ecc_len - layout->oobfree[0].offset; in pmecc_config_ecc_layout() 556 chip->read_buf(mtd, oob, mtd->oobsize); in atmel_nand_pmecc_read_page() 620 chip->write_buf(mtd, chip->oob_poi, mtd->oobsize); in atmel_nand_pmecc_write_page() 681 pmecc_writel(host->pmecc, sarea, mtd->oobsize - 1); in atmel_pmecc_core_init() 926 if (nand->ecc.bytes > mtd->oobsize - PMECC_OOB_RESERVED_BYTES) { in atmel_pmecc_nand_init_params() 931 mtd->oobsize, in atmel_pmecc_nand_init_params() 1079 chip->read_buf(mtd, oob, mtd->oobsize); in atmel_nand_read_page() 1441 mtd->oobsize = CONFIG_SYS_NAND_OOBSIZE; in nand_init()
|
/u-boot/drivers/mtd/onenand/ |
A D | onenand_base.c | 526 return mtd->oobsize; in onenand_bufferram_offset() 870 oobsize = mtd->oobsize; in onenand_read_ops_nolock() 1023 oobsize = mtd->oobsize; in onenand_read_oob_nolock() 1046 thislen = oobsize - column; in onenand_read_oob_nolock() 1442 oobsize = mtd->oobsize; in onenand_write_ops_nolock() 1539 int column, ret = 0, oobsize; in onenand_write_oob_nolock() local 1557 oobsize = mtd->oobsize; in onenand_write_oob_nolock() 2403 .ooblen = mtd->oobsize, in flexonenand_check_blocks_erased() 2428 if (i != mtd->oobsize) { in flexonenand_check_blocks_erased() 2749 switch (mtd->oobsize) { in onenand_scan() [all …]
|
/u-boot/cmd/ |
A D | mtd.c | 88 u64 oob_off = page * mtd->oobsize; in mtd_dump_device_buf() 91 mtd->oobsize, start_off + data_off); in mtd_dump_device_buf() 93 mtd->oobsize, 0); in mtd_dump_device_buf() 163 if (mtd->oobsize) { in mtd_show_device() 164 printf(" - OOB size: %u bytes\n", mtd->oobsize); in mtd_show_device() 235 io_op->oobretlen = woob ? mtd->oobsize : 0; in mtd_special_write_oob() 304 oob_len = woob ? npages * mtd->oobsize : 0; in do_mtd_io() 328 io_op.ooblen = woob ? mtd->oobsize : 0; in do_mtd_io()
|
A D | onenand.c | 113 .ooblen = mtd->oobsize, in onenand_write_oneblock_withoob() 121 buf += mtd->oobsize; in onenand_write_oneblock_withoob() 312 datbuf = malloc(mtd->writesize + mtd->oobsize); in onenand_dump() 313 oobbuf = malloc(mtd->oobsize); in onenand_dump() 324 ops.ooblen = mtd->oobsize; in onenand_dump() 347 i = mtd->oobsize >> 3; in onenand_dump()
|
A D | nand.c | 65 oobbuf = memalign(ARCH_DMA_MINALIGN, mtd->oobsize); in nand_dump() 78 ops.ooblen = mtd->oobsize; in nand_dump() 103 i = mtd->oobsize >> 3; in nand_dump() 306 printf(" OOB size %8d b\n", mtd->oobsize); in nand_print_and_set_info() 314 env_set_hex("nand_oobsize", mtd->oobsize); in nand_print_and_set_info() 329 .ooblen = mtd->oobsize, in raw_access() 347 addr += mtd->writesize + mtd->oobsize; in raw_access() 595 rwsize = pagecount * (mtd->writesize + mtd->oobsize); in do_nand()
|
/u-boot/drivers/mtd/nand/spi/ |
A D | micron.c | 57 region->offset = mtd->oobsize / 2; in micron_8_ooblayout_ecc() 58 region->length = mtd->oobsize / 2; in micron_8_ooblayout_ecc() 71 region->length = (mtd->oobsize / 2) - 2; in micron_8_ooblayout_free()
|
A D | toshiba.c | 50 region->offset = mtd->oobsize / 2; in tx58cxgxsxraix_ooblayout_ecc() 51 region->length = mtd->oobsize / 2; in tx58cxgxsxraix_ooblayout_ecc() 64 region->length = (mtd->oobsize / 2) - 2; in tx58cxgxsxraix_ooblayout_free()
|
A D | macronix.c | 45 region->length = mtd->oobsize - 2; in mx35lfxge4ab_ooblayout_free()
|
/u-boot/drivers/mtd/nand/ |
A D | core.c | 233 mtd->oobsize = memorg->oobsize; in nanddev_init()
|
/u-boot/include/ |
A D | mxs_nand.h | 79 u32 oobsize; member
|
/u-boot/include/linux/mtd/ |
A D | nand.h | 29 unsigned int oobsize; member 41 .oobsize = (os), \ 256 return nand->memorg.oobsize; in nanddev_per_page_oobsize()
|