From: Han Xu Date: Fri, 9 Oct 2015 16:19:01 +0000 (-0500) Subject: MLK-11720: mtd: gpmi: change the erase threshold for mx6qp,mx6ul and mx7d X-Git-Tag: C0P2-H0.0--20200415~3987 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=f0a95fdbfb0f974ca88c00d611c202b83deb5b33;p=linux.git MLK-11720: mtd: gpmi: change the erase threshold for mx6qp,mx6ul and mx7d The erase threshold should be set to ecc_strength for these platforms. Signed-off-by: Han Xu (cherry picked from commit f46d113a02f5375c38fc9aba88c587fd672a30c4) --- diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c index 1eea71191455..b8a753b0471c 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c @@ -326,9 +326,9 @@ int bch_set_geometry(struct gpmi_nand_data *this) | 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. */