| BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(blockn_size, this),
r->bch_regs + HW_BCH_FLASH0LAYOUT1);
- /* Set erase threshold to gf/2 for mx6ul, mx6qp and mx7 */
+ /* Set erase threshold to ecc strength for mx6ul, mx6qp and mx7 */
if (GPMI_IS_MX6QP(this) || GPMI_IS_MX7(this) || GPMI_IS_MX6UL(this))
- writel(BF_BCH_MODE_ERASE_THRESHOLD(gf_len/2),
+ writel(BF_BCH_MODE_ERASE_THRESHOLD(ecc_strength),
r->bch_regs + HW_BCH_MODE);
/* Set *all* chip selects to use layout 0. */