MLK-22579: fix: iMX8MM: fix the compilation error of i.MX8MM caused by MLK-22444
authorAlice Guo <alice.guo@nxp.com>
Mon, 30 Sep 2019 18:22:57 +0000 (02:22 +0800)
committerYe Li <ye.li@nxp.com>
Mon, 30 Sep 2019 02:01:31 +0000 (19:01 -0700)
Conditional compilation added in MLK-22444 caused U-Boot compilation
of i.MX8MM error. Delete the wrong conditional compilation.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
(cherry picked from commit 5638f06c300edf87461b822e2c42df2c9ccdd40f)

drivers/mtd/nand/raw/mxs_nand.c
include/mxs_nand.h

index 56c7608..699294c 100644 (file)
@@ -858,8 +858,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 CONFIG_IS_ENABLED(MX7)
-       if (nand_info->en_randomizer) {
+       if (is_mx7() && nand_info->en_randomizer) {
                d->cmd.pio_words[2] |= GPMI_ECCCTRL_RANDOMIZER_ENABLE |
                                       GPMI_ECCCTRL_RANDOMIZER_TYPE2;
                /*
@@ -871,7 +870,6 @@ static int mxs_nand_ecc_write_page(struct mtd_info *mtd,
                 */
                d->cmd.pio_words[3] |= (page % 255) << 16;
        }
-#endif
 
        mxs_dma_desc_append(channel, d);
 
index 71dcc17..6182214 100644 (file)
@@ -73,13 +73,11 @@ struct mxs_nand_info {
        struct mxs_dma_desc     **desc;
        uint32_t                desc_index;
 
-#if CONFIG_IS_ENABLED(MX7) || CONFIG_IS_ENABLED(MX6)
        u32 en_randomizer;
        u32 writesize;
        u32 oobsize;
        u32 bch_flash0layout0;
        u32 bch_flash0layout1;
-#endif /* CONFIG_IS_ENABLED(MX7) */
 };
 
 struct mxs_nand_layout {
@@ -95,10 +93,8 @@ int mxs_nand_init_ctrl(struct mxs_nand_info *nand_info);
 int mxs_nand_init_spl(struct nand_chip *nand);
 int mxs_nand_setup_ecc(struct mtd_info *mtd);
 
-#if CONFIG_IS_ENABLED(MX7) || CONFIG_IS_ENABLED(MX6)
 void mxs_nand_mode_fcb(struct mtd_info *mtd);
 void mxs_nand_mode_normal(struct mtd_info *mtd);
 u32 mxs_nand_mark_byte_offset(struct mtd_info *mtd);
 u32 mxs_nand_mark_bit_offset(struct mtd_info *mtd);
 void mxs_nand_get_layout(struct mtd_info *mtd, struct mxs_nand_layout *l);
-#endif /* CONFIG_IS_ENABLED(MX7) */