Lines Matching refs:ecc_cfg
311 struct mtk_ecc_config *ecc_cfg;
671 struct mtk_ecc_config *ecc_cfg;
678 ecc_cfg = kzalloc(sizeof(*ecc_cfg), GFP_KERNEL);
679 if (!ecc_cfg)
682 nand->ecc.ctx.priv = ecc_cfg;
699 ecc_cfg->mode = ECC_NFI_MODE;
700 ecc_cfg->sectors = snf->nfi_cfg.nsectors;
701 ecc_cfg->len = snf->caps->sector_size + snf->caps->fdm_ecc_size;
706 ecc_cfg->strength = max_ecc_bytes * 8 / parity_bits;
707 mtk_ecc_adjust_strength(snf->ecc, &ecc_cfg->strength);
713 u32 s_next = ecc_cfg->strength - 1;
717 if (s_next >= ecc_cfg->strength)
721 s_next = ecc_cfg->strength - 1;
728 conf->strength = ecc_cfg->strength;
730 if (ecc_cfg->strength < strength)
734 ecc_cfg->strength, snf->caps->sector_size);
741 struct mtk_ecc_config *ecc_cfg = nand_to_ecc_ctx(nand);
743 kfree(ecc_cfg);
750 struct mtk_ecc_config *ecc_cfg = nand_to_ecc_ctx(nand);
758 snf->ecc_cfg = ecc_cfg;
768 snf->ecc_cfg = NULL;
944 snf->ecc_cfg->op = ECC_DECODE;
945 ret = mtk_ecc_enable(snf->ecc, snf->ecc_cfg);
1134 snf->ecc_cfg->op = ECC_ENCODE;
1135 ret = mtk_ecc_enable(snf->ecc, snf->ecc_cfg);