Merge git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / arch / arm / mach-sunxi / board.c
index 65b1ebd837871bccb2c0b73f52541da5bc6c192f..0c60ee04da54f1da84645bfb44243dd67ca05dec 100644 (file)
@@ -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>
@@ -212,11 +210,12 @@ void s_init(void)
 
 #ifdef CONFIG_SPL_BUILD
 DECLARE_GLOBAL_DATA_PTR;
+#endif
 
 /* The sunxi internal brom will try to loader external bootloader
  * from mmc0, nand flash, mmc2.
  */
-u32 spl_boot_device(void)
+uint32_t sunxi_get_boot_device(void)
 {
        int boot_source;
 
@@ -255,6 +254,12 @@ u32 spl_boot_device(void)
        return -1;              /* Never reached */
 }
 
+#ifdef CONFIG_SPL_BUILD
+u32 spl_boot_device(void)
+{
+       return sunxi_get_boot_device();
+}
+
 /* No confirmation data available in SPL yet. Hardcode bootmode */
 u32 spl_boot_mode(const u32 boot_device)
 {