[U-Boot] [PATCH 21/24] tegra124: Implement spl_was_boot_source()
Simon Glass
sjg at chromium.org
Mon May 4 19:31:14 CEST 2015
Add an implementation of this function for Tegra.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/arm/mach-tegra/board.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 222de6a..77be211 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
+#include <spl.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
@@ -29,6 +30,21 @@ enum {
UART_COUNT = 5,
};
+static bool from_spl __attribute__ ((section(".data")));
+
+#ifndef CONFIG_SPL_BUILD
+void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
+{
+ from_spl = r0 != SPL_RUNNING_FROM_UBOOT;
+ save_boot_params_ret();
+}
+#endif
+
+bool spl_was_boot_source(void)
+{
+ return from_spl;
+}
+
#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
#if !defined(CONFIG_TEGRA124)
#error tegra_cpu_is_non_secure has only been validated on Tegra124
--
2.2.0.rc0.207.ga3a616c
More information about the U-Boot
mailing list