MA-17916-1 Clean Up: Guard codes with correct configs
authorJi Luo <ji.luo@nxp.com>
Mon, 21 Sep 2020 08:22:21 +0000 (16:22 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:19 +0000 (09:49 +0800)
This commit does some clean-up to guard the codes/configs with
correct configs, so we can enable/disable the feature without
modifying the codes.

Test: builds and boots on imx8qm.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ic4cf4d9f47bd5a4317b2621a5378cb4b192e52fb
(cherry picked from commit 2c2363e47b858bd178c44869328eca211b2c3f62)
(cherry picked from commit cdf01e8a0fbf29df6230344889d1ec5035b6c978)

board/freescale/imx8qm_mek/spl.c
board/freescale/imx8qxp_mek/spl.c

index efe8bde..a2c7b87 100644 (file)
@@ -49,9 +49,12 @@ void spl_board_init(void)
 
        timer_init();
 
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
        preloader_console_init();
 
        puts("Normal Boot\n");
+#endif
+
 }
 
 void spl_board_prepare_for_boot(void)
index 0b08540..8be64fe 100644 (file)
@@ -67,9 +67,11 @@ void spl_board_init(void)
        imx8_iomux_setup_multiple_pads(usdhc2_sd_pwr, ARRAY_SIZE(usdhc2_sd_pwr));
        gpio_direction_output(USDHC2_SD_PWR, 0);
 
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
        preloader_console_init();
 
        puts("Normal Boot\n");
+#endif
 }
 
 void spl_board_prepare_for_boot(void)