| /OK3568_Linux_fs/u-boot/tools/ |
| H A D | mxsboot.c | 138 static inline uint32_t mx28_nand_ecc_size_in_bits(uint32_t ecc_strength) in mx28_nand_ecc_size_in_bits() argument 140 return ecc_strength * MXS_NAND_BITS_PER_ECC_LEVEL; in mx28_nand_ecc_size_in_bits() 146 int ecc_strength; in mx28_nand_get_ecc_strength() local 156 ecc_strength = ((page_oob_size - MXS_NAND_METADATA_SIZE) * 8) in mx28_nand_get_ecc_strength() 160 return round_down(ecc_strength, 2); in mx28_nand_get_ecc_strength() 164 uint32_t ecc_strength) in mx28_nand_get_mark_offset() argument 174 chunk_ecc_size_in_bits = mx28_nand_ecc_size_in_bits(ecc_strength); in mx28_nand_get_mark_offset() 214 uint32_t ecc_strength; in mx28_nand_mark_byte_offset() local 215 ecc_strength = mx28_nand_get_ecc_strength(nand_writesize, nand_oobsize); in mx28_nand_mark_byte_offset() 216 return mx28_nand_get_mark_offset(nand_writesize, ecc_strength) >> 3; in mx28_nand_mark_byte_offset() [all …]
|
| H A D | sunxi-spl-image-builder.c | 22 int ecc_strength; member 118 int eccbytes = DIV_ROUND_UP(info->ecc_strength * 14, 8); in write_page() 245 bch = init_bch(14, info->ecc_strength, BCH_PRIMITIVE_POLY); in create_image() 371 if (valid_ecc_strengths[i] == info->ecc_strength) in check_image_info() 377 info->ecc_strength); in check_image_info() 381 eccbytes = DIV_ROUND_UP(info->ecc_strength * 14, 8); in check_image_info() 435 info.ecc_strength = strtol(optarg, &endptr, 0); in main()
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/raw/ |
| H A D | mtk_ecc.c | 47 const u8 *ecc_strength; member 172 if (ecc->caps->ecc_strength[i] == config->strength) in mtk_ecc_config() 428 const u8 *ecc_strength = ecc->caps->ecc_strength; in mtk_ecc_adjust_strength() local 432 if (*p <= ecc_strength[i]) { in mtk_ecc_adjust_strength() 434 *p = ecc_strength[i]; in mtk_ecc_adjust_strength() 435 else if (*p != ecc_strength[i]) in mtk_ecc_adjust_strength() 436 *p = ecc_strength[i - 1]; in mtk_ecc_adjust_strength() 441 *p = ecc_strength[ecc->caps->num_ecc_strength - 1]; in mtk_ecc_adjust_strength() 454 .ecc_strength = ecc_strength_mt2701, 465 .ecc_strength = ecc_strength_mt2712, [all …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/raw/gpmi-nand/ |
| H A D | gpmi-nand.c | 227 geo->ecc_strength, in gpmi_dump_info() 249 return geo->ecc_strength <= this->devdata->bch_max_ecc_strength; in gpmi_check_ecc() 259 unsigned int ecc_strength, in set_geometry_by_ecc_info() argument 282 geo->ecc_strength = round_up(ecc_strength, 2); in set_geometry_by_ecc_info() 348 (geo->gf_len * geo->ecc_strength * geo->ecc_chunk_count) / 8; in set_geometry_by_ecc_info() 361 (geo->ecc_strength * geo->gf_len * (geo->ecc_chunk_count - 1) in set_geometry_by_ecc_info() 391 int ecc_strength; in get_ecc_strength() local 393 ecc_strength = ((mtd->oobsize - geo->metadata_size) * 8) in get_ecc_strength() 397 return round_down(ecc_strength, 2); in get_ecc_strength() 428 geo->ecc_strength = get_ecc_strength(this); in legacy_set_geometry() [all …]
|
| H A D | gpmi-nand.h | 48 unsigned int ecc_strength; member
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/nand/raw/ |
| H A D | sunxi_nand_spl.c | 88 int ecc_strength; member 260 int oob_chunk_sz = ecc_bytes[conf->ecc_strength]; in nand_read_page() 281 writel((rand_seed << 16) | (conf->ecc_strength << 12) | in nand_read_page() 391 for (conf->ecc_strength = max_ecc_strength; in nand_detect_ecc_config() 392 conf->ecc_strength >= 0; in nand_detect_ecc_config() 393 conf->ecc_strength--) { in nand_detect_ecc_config()
|
| H A D | mxs_nand.c | 119 uint32_t chunk_ecc_size_in_bits = geo->ecc_strength * geo->gf_len; in mxs_nand_calc_mark_offset() 166 unsigned int ecc_strength, in mxs_nand_calc_ecc_layout_by_info() argument 184 geo->ecc_strength = round_up(ecc_strength, 2); in mxs_nand_calc_ecc_layout_by_info() 190 if (geo->ecc_strength > nand_info->max_ecc_strength_supported) in mxs_nand_calc_ecc_layout_by_info() 231 geo->ecc_strength = ((mtd->oobsize - MXS_NAND_METADATA_SIZE) * 8) in mxs_nand_calc_ecc_layout() 234 geo->ecc_strength = min(round_down(geo->ecc_strength, 2), in mxs_nand_calc_ecc_layout() 1019 tmp |= (geo->ecc_strength >> 1) << BCH_FLASHLAYOUT0_ECC0_OFFSET; in mxs_nand_setup_ecc() 1027 tmp |= (geo->ecc_strength >> 1) << BCH_FLASHLAYOUT1_ECCN_OFFSET; in mxs_nand_setup_ecc() 1253 nand->ecc.strength = nand_info->bch_geometry.ecc_strength; in mxs_nand_init_ctrl()
|
| H A D | pxa3xx_nand.c | 1647 uint16_t ecc_strength, ecc_step; in pxa3xx_nand_scan() local 1690 if (pdata->ecc_strength && pdata->ecc_step_size) { in pxa3xx_nand_scan() 1691 ecc_strength = pdata->ecc_strength; in pxa3xx_nand_scan() 1694 ecc_strength = chip->ecc_strength_ds; in pxa3xx_nand_scan() 1699 if (ecc_strength < 1 && ecc_step < 1) { in pxa3xx_nand_scan() 1700 ecc_strength = 1; in pxa3xx_nand_scan() 1704 ret = pxa_ecc_init(info, &chip->ecc, ecc_strength, in pxa3xx_nand_scan() 1852 pdata->ecc_strength = fdtdec_get_int(blob, node, in pxa3xx_nand_probe_dt()
|
| H A D | pxa3xx_nand.h | 56 int ecc_strength, ecc_step_size; member
|
| H A D | mxs_nand.h | 30 unsigned int ecc_strength; member
|
| H A D | rockchip_nand.c | 83 uint32_t ecc_strength; member 368 rockchip_nand_hw_ecc_setup(mtd, ecc, rknand->ecc_strength); in rockchip_nand_hw_syndrome_pio_read_page() 440 rockchip_nand_hw_ecc_setup(mtd, ecc, rknand->ecc_strength); in rockchip_nand_hw_syndrome_pio_write_page() 502 rknand->ecc_strength = ecc->strength; in rockchip_nand_hw_ecc_ctrl_init()
|
| H A D | rockchip_nand_v9.c | 85 uint32_t ecc_strength; member 369 rockchip_nand_hw_ecc_setup(mtd, ecc, rknand->ecc_strength); in rockchip_nand_hw_syndrome_pio_read_page() 441 rockchip_nand_hw_ecc_setup(mtd, ecc, rknand->ecc_strength); in rockchip_nand_hw_syndrome_pio_write_page() 503 rknand->ecc_strength = ecc->strength; in rockchip_nand_hw_ecc_ctrl_init()
|
| H A D | nand_base.c | 4576 int ret, ecc_mode = -1, ecc_strength, ecc_step; in nand_dt_init() local 4604 ecc_strength = fdtdec_get_int(blob, node, "nand-ecc-strength", -1); in nand_dt_init() 4607 if ((ecc_step >= 0 && !(ecc_strength >= 0)) || in nand_dt_init() 4608 (!(ecc_step >= 0) && ecc_strength >= 0)) { in nand_dt_init() 4616 if (ecc_strength >= 0) in nand_dt_init() 4617 chip->ecc.strength = ecc_strength; in nand_dt_init() 5279 mtd->ecc_strength = ecc->strength; in nand_scan_tail() 5287 mtd->bitflip_threshold = DIV_ROUND_UP(mtd->ecc_strength * 3, 4); in nand_scan_tail()
|
| /OK3568_Linux_fs/kernel/include/linux/platform_data/ |
| H A D | mtd-nand-pxa3xx.h | 19 int ecc_strength, ecc_step_size; member
|
| /OK3568_Linux_fs/kernel/Documentation/ABI/testing/ |
| H A D | sysfs-class-mtd | 125 What: /sys/class/mtd/mtdX/ecc_strength 152 If not, then the default value is ecc_strength. 168 ecc_strength, -EUCLEAN is never returned by the read operations. 174 i.e., devices for which ecc_strength is zero.
|
| /OK3568_Linux_fs/u-boot/cmd/ |
| H A D | mtd.c | 152 if (mtd->ecc_strength) { in mtd_show_device() 153 printf(" - ECC strength: %u bits\n", mtd->ecc_strength); in mtd_show_device()
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/ |
| H A D | mtdcore.c | 335 return snprintf(buf, PAGE_SIZE, "%u\n", mtd->ecc_strength); in mtd_ecc_strength_show() 337 static DEVICE_ATTR(ecc_strength, S_IRUGO, mtd_ecc_strength_show, NULL); 448 mtd->bitflip_threshold = mtd->ecc_strength; in add_mtd_device() 980 if (mtd->ecc_strength == 0) in mtd_read() 1097 if (mtd->ecc_strength == 0) in mtd_read_oob()
|
| H A D | mtdpart.c | 760 slave->ecc_strength = master->ecc_strength; in allocate_partition()
|
| /OK3568_Linux_fs/kernel/drivers/mtd/ |
| H A D | mtdpart.c | 196 child->ecc_strength = parent->ecc_strength; in allocate_partition()
|
| H A D | mtdcore.c | 227 return snprintf(buf, PAGE_SIZE, "%u\n", mtd->ecc_strength); in mtd_ecc_strength_show() 229 static DEVICE_ATTR(ecc_strength, S_IRUGO, mtd_ecc_strength_show, NULL); 626 mtd->bitflip_threshold = mtd->ecc_strength; in add_mtd_device() 1432 if (mtd->ecc_strength == 0) in mtd_read_oob()
|
| /OK3568_Linux_fs/u-boot/include/linux/mtd/ |
| H A D | mtd.h | 226 unsigned int ecc_strength; member
|
| /OK3568_Linux_fs/kernel/include/linux/mtd/ |
| H A D | mtd.h | 301 unsigned int ecc_strength; member
|
| /OK3568_Linux_fs/u-boot/drivers/mtd/nand/spi/ |
| H A D | core.c | 1202 mtd->ecc_strength = nand->eccreq.strength; in spinand_init()
|
| /OK3568_Linux_fs/kernel/drivers/mtd/nand/spi/ |
| H A D | core.c | 1279 mtd->ecc_strength = nanddev_get_ecc_requirements(nand)->strength; in spinand_init()
|
| /OK3568_Linux_fs/kernel/drivers/mtd/devices/ |
| H A D | docg3.c | 1779 mtd->ecc_strength = DOC_ECC_BCH_T; in doc_set_driver_info()
|