[U-Boot] [PATCH 2/4] arm: sunxi: compile spl_boot_device even for U-Boot

Maxime Ripard maxime.ripard at free-electrons.com
Wed Aug 23 11:41:34 UTC 2017


U-Boot itself might need to identify the boot device, for example to be
able to tell where to load the kernel from when several options are
possible.

Remove the guard preventing it from being compiled.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 arch/arm/mach-sunxi/board.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 65b1ebd83787..f5e977b4183d 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -14,9 +14,7 @@
 #include <mmc.h>
 #include <i2c.h>
 #include <serial.h>
-#ifdef CONFIG_SPL_BUILD
 #include <spl.h>
-#endif
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
@@ -210,7 +208,6 @@ void s_init(void)
 	eth_init_board();
 }
 
-#ifdef CONFIG_SPL_BUILD
 DECLARE_GLOBAL_DATA_PTR;
 
 /* The sunxi internal brom will try to loader external bootloader
@@ -261,6 +258,7 @@ u32 spl_boot_mode(const u32 boot_device)
 	return MMCSD_MODE_RAW;
 }
 
+#ifdef CONFIG_SPL_BUILD
 void board_init_f(ulong dummy)
 {
 	spl_init();
-- 
2.13.5



More information about the U-Boot mailing list