]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
nand: mxs_nand: make imx8mm can use hardware BCH and randomizer
authorAlice Guo <alice.guo@nxp.com>
Mon, 4 May 2020 14:08:59 +0000 (22:08 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 10 May 2020 18:55:20 +0000 (20:55 +0200)
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 <alice.guo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mtd/nand/raw/mxs_nand.c

index 1b66636a4f4c41be88fcbbd3725f691f1f064256..3bf5ab2d8c6b4c052d4546154a38d20ae14b53ad 100644 (file)
@@ -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;
                /*