From patchwork Mon May 4 14:08:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 245033 List-Id: U-Boot discussion From: peng.fan at nxp.com (Peng Fan) Date: Mon, 4 May 2020 22:08:59 +0800 Subject: [PATCH 10/14] nand: mxs_nand: make imx8mm can use hardware BCH and randomizer In-Reply-To: <20200504140903.23602-1-peng.fan@nxp.com> References: <20200504140903.23602-1-peng.fan@nxp.com> Message-ID: <20200504140903.23602-11-peng.fan@nxp.com> From: Alice Guo imx8mm needs to BCH encode and set NAND page number needed to be randomized modify conditional compilation Use CONFIG_IMX8M, so it apply to imx8mq/mm/mn Signed-off-by: Alice Guo Signed-off-by: Peng Fan --- drivers/mtd/nand/raw/mxs_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/mxs_nand.c b/drivers/mtd/nand/raw/mxs_nand.c index 1b66636a4f..3bf5ab2d8c 100644 --- a/drivers/mtd/nand/raw/mxs_nand.c +++ b/drivers/mtd/nand/raw/mxs_nand.c @@ -859,7 +859,7 @@ static int mxs_nand_ecc_write_page(struct mtd_info *mtd, d->cmd.pio_words[4] = (dma_addr_t)nand_info->data_buf; d->cmd.pio_words[5] = (dma_addr_t)nand_info->oob_buf; - if (is_mx7() && nand_info->en_randomizer) { + if ((is_mx7() || is_imx8m()) && nand_info->en_randomizer) { d->cmd.pio_words[2] |= GPMI_ECCCTRL_RANDOMIZER_ENABLE | GPMI_ECCCTRL_RANDOMIZER_TYPE2; /*