diff options
author | Han Xu | 2020-05-04 22:09:02 +0800 |
---|---|---|
committer | Stefano Babic | 2020-05-10 20:55:20 +0200 |
commit | f7bb012ab7e19d3ede6c0e9a39edd6a37bd598ff (patch) | |
tree | 269928c701547186ec9b505aec990b371b16928a /drivers/mtd | |
parent | a59691280dacae478183c95a93c5f00f4717d49c (diff) |
mxs_nand: don't check zero count when ECC reading with randomizer
When enabled randomizer during ECC reading, the controller reported it's
erased page. Checking zero count will cause data get modified to all
0xFF. Stop checking during randomizer to workaround this issue.
Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/mxs_nand.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c index b6e65c616d3..3fd21e51f2a 100644 --- a/drivers/mtd/nand/raw/mxs_nand.c +++ b/drivers/mtd/nand/raw/mxs_nand.c @@ -773,8 +773,9 @@ static int mxs_nand_ecc_read_page(struct mtd_info *mtd, struct nand_chip *nand, continue; if (status[i] == 0xff) { - if (is_mx6dqp() || is_mx7() || - is_mx6ul() || is_imx8() || is_imx8m()) + if (!nand_info->en_randomizer && + (is_mx6dqp() || is_mx7() || is_mx6ul() || + is_imx8() || is_imx8m())) if (readl(&bch_regs->hw_bch_debug1)) flag = 1; continue; |