summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-11-16 04:44:09 +0300
committerTom Rini <trini@konsulko.com>2018-11-26 16:25:37 +0300
commitb0edea3c27af3bf7b959fa190a7fe9d7881153c5 (patch)
treee48319d91713218a49706b7526f147f2d56c7aee /common/board_f.c
parent27028f186d17a25507eb7d5c9b852d8555432679 (diff)
downloadu-boot-b0edea3c27af3bf7b959fa190a7fe9d7881153c5.tar.xz
spl: Add support for passing handoff info to U-Boot proper
There is some basic informaton that SPL normally wants to pass through to U-Boot, such as the SDRAM size and bank information. Mkae use of the new bloblist structure for this. Add a new 'handoff' blob which is set up in SPL and passed to U-Boot proper. Also adda test for sandbox_spl that checks that this works correctly and a new 'sb' command to show the information passed from SPL. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 290e2b09b9..835b7247c5 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -25,6 +25,9 @@
#include <post.h>
#include <relocate.h>
#include <spi.h>
+#ifdef CONFIG_SPL
+#include <spl.h>
+#endif
#include <status_led.h>
#include <sysreset.h>
#include <timer.h>
@@ -286,6 +289,17 @@ static int setup_mon_len(void)
return 0;
}
+static int setup_spl_handoff(void)
+{
+#if CONFIG_IS_ENABLED(HANDOFF)
+ gd->spl_handoff = bloblist_find(BLOBLISTT_SPL_HANDOFF,
+ sizeof(struct spl_handoff));
+ debug("Found SPL hand-off info %p\n", gd->spl_handoff);
+#endif
+
+ return 0;
+}
+
__weak int arch_cpu_init(void)
{
return 0;
@@ -845,6 +859,7 @@ static const init_fnc_t init_sequence_f[] = {
#ifdef CONFIG_BLOBLIST
bloblist_init,
#endif
+ setup_spl_handoff,
initf_console_record,
#if defined(CONFIG_HAVE_FSP)
arch_fsp_init,