From f0a95fdbfb0f974ca88c00d611c202b83deb5b33 Mon Sep 17 00:00:00 2001 From: Han Xu Date: Fri, 9 Oct 2015 11:19:01 -0500 Subject: [PATCH] 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) --- drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. */ -- 2.17.1