summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-05-13 07:02:29 -0600
committerTom Warren <twarren@nvidia.com>2015-07-27 14:03:06 -0700
commit537e9673619ce6583cc3a81c47f78089ef1e32ba (patch)
treeaed25c922c93c5a75812f1c85f78df91207251b2
parent26473945ad6667183296e7edee2a65edf31bb6f7 (diff)
downloadu-boot-imx-537e9673619ce6583cc3a81c47f78089ef1e32ba.zip
u-boot-imx-537e9673619ce6583cc3a81c47f78089ef1e32ba.tar.gz
u-boot-imx-537e9673619ce6583cc3a81c47f78089ef1e32ba.tar.bz2
tegra124: Implement spl_was_boot_source()
Add an implementation of this function for Tegra. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 222de6a..a880a87 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 != UBOOT_NOT_LOADED_FROM_SPL;
+ 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