diff options
author | Han Xu <b45815@freescale.com> | 2015-09-15 15:50:18 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@nxp.com> | 2016-01-14 11:02:31 -0600 |
commit | 58e5839cd8ab0c764393f28941fa379fe10e4045 (patch) | |
tree | 6011cf9379b9847af3a2409c89209919eb1a7ce1 /drivers/mtd/nand | |
parent | c0656d057640760d34bf57c1b53ee68bfcd34416 (diff) |
MLK-11555: mtd: nand: i.MX6UL supports bitflip detection
i.MX6UL also has the DEBUG1 register which can be used for bitflip
detection for erased page.
Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit 8df8d10edc8909e19e60f0cc1dd65c1fe706ab67)
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 4 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c index 84bdb09fa261..1113ac5534e5 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c @@ -304,8 +304,8 @@ int bch_set_geometry(struct gpmi_nand_data *this) | BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(block_size, this), r->bch_regs + HW_BCH_FLASH0LAYOUT1); - /* Set erase threshold to gf/2 for mx6qp and mx7 */ - if (GPMI_IS_MX6QP(this) || GPMI_IS_MX7(this)) + /* Set erase threshold to gf/2 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), r->bch_regs + HW_BCH_MODE); diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index d3f914a177c6..6c795e8b4b85 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -1090,7 +1090,8 @@ static int gpmi_ecc_read_page(struct mtd_info *mtd, struct nand_chip *chip, continue; if (*status == STATUS_ERASED) { - if (GPMI_IS_MX6QP(this) || GPMI_IS_MX7(this)) + if (GPMI_IS_MX6QP(this) || GPMI_IS_MX7(this) || + GPMI_IS_MX6UL(this)) if (readl(bch_regs + HW_BCH_DEBUG1)) flag = 1; continue; |