]> git.sur5r.net Git - u-boot/commitdiff
spl: ti: Avoid preloader_console_init if !CONFIG_SPL_SERIAL_SUPPORT
authorAlex Kiernan <alex.kiernan@gmail.com>
Thu, 19 Apr 2018 04:32:51 +0000 (04:32 +0000)
committerTom Rini <trini@konsulko.com>
Sat, 28 Apr 2018 22:32:22 +0000 (18:32 -0400)
If CONFIG_SPL_SERIAL_SUPPORT is disabled then the build fails because
serial_init is undefined. Guard preloader_console_init() appropriately
to fix this.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
arch/arm/mach-omap2/boot-common.c
common/spl/spl.c

index db68a9d7e21f582e65bfc21c0f6e43acaef2e5b2..f9ab5da7230d333fac0912698337d6e93d1eb4f8 100644 (file)
@@ -196,9 +196,10 @@ u32 spl_boot_mode(const u32 boot_device)
 
 void spl_board_init(void)
 {
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
        /* Prepare console output */
        preloader_console_init();
-
+#endif
 #if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT)
        gpmc_init();
 #endif
index 61d3071324b05f1f2b5edb662baeb8f18d5b370e..794dbd031245c6f8c65868dc3fb6fb0a60f4cff8 100644 (file)
@@ -471,6 +471,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        jump_to_image_no_args(&spl_image);
 }
 
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
 /*
  * This requires UART clocks to be enabled.  In order for this to work the
  * caller must ensure that the gd pointer is valid.
@@ -491,6 +492,7 @@ void preloader_console_init(void)
        spl_display_print();
 #endif
 }
+#endif
 
 /**
  * spl_relocate_stack_gd() - Relocate stack ready for board_init_r() execution