summaryrefslogtreecommitdiffstats
path: root/include/spl.h
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2015-06-15 12:08:11 +0200
committerStefano Babic <sbabic@denx.de>2015-06-15 12:08:11 +0200
commit212b66016120fa4cd3b8f7edbe4c9f106032884e (patch)
treef956cd9195952c7890493897a9c2108a8ee852d7 /include/spl.h
parentb31fb4b97b4d9c9fcf5a50c39d5d2c277f7008c9 (diff)
parent64d16706a052553c85d2f8f4c741879a4e3e6116 (diff)
downloadu-boot-212b66016120fa4cd3b8f7edbe4c9f106032884e.tar.gz
u-boot-212b66016120fa4cd3b8f7edbe4c9f106032884e.tar.xz
u-boot-212b66016120fa4cd3b8f7edbe4c9f106032884e.zip
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index b2e5bf726f..d19940f2a3 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -11,6 +11,8 @@
#include <linux/compiler.h>
#include <asm/spl.h>
+/* Value in r0 indicates we booted from U-Boot */
+#define UBOOT_NOT_LOADED_FROM_SPL 0x13578642
/* Boot type */
#define MMCSD_MODE_UNDEFINED 0
@@ -82,4 +84,15 @@ int spl_load_image_ext_os(block_dev_desc_t *block_dev, int partition);
#ifdef CONFIG_SPL_BOARD_INIT
void spl_board_init(void);
#endif
+
+/**
+ * spl_was_boot_source() - check if U-Boot booted from SPL
+ *
+ * This will normally be true, but if U-Boot jumps to second U-Boot, it will
+ * be false. This should be implemented by board-specific code.
+ *
+ * @return true if U-Boot booted from SPL, else false
+ */
+bool spl_was_boot_source(void);
+
#endif