Revert "global_data: Drop spl_handoff"

This breaks chromebook_coral which says:

   Video: No video mode configured in FSP!

This reverts commit 2e9313179a846b581c0fc3f6a49e19f3d343efa8.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/x86/cpu/intel_common/cpu_from_spl.c b/arch/x86/cpu/intel_common/cpu_from_spl.c
index 5aad2ae..48b2ef2 100644
--- a/arch/x86/cpu/intel_common/cpu_from_spl.c
+++ b/arch/x86/cpu/intel_common/cpu_from_spl.c
@@ -24,7 +24,9 @@
 	int ret;
 
 #if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
-	gd->arch.hob_list = handoff_get();
+	struct spl_handoff *ho = gd->spl_handoff;
+
+	gd->arch.hob_list = ho->arch.hob_list;
 #endif
 	ret = x86_cpu_reinit_f();
 
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index 4c4c833..75fa8f9 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -59,7 +59,7 @@
 #endif
 	} else {
 #if CONFIG_IS_ENABLED(HANDOFF)
-		struct spl_handoff *ho = handoff_get();
+		struct spl_handoff *ho = gd->spl_handoff;
 
 		if (!ho) {
 			log_debug("No SPL handoff found\n");
@@ -82,7 +82,7 @@
 		return gd->ram_size;
 
 #if CONFIG_IS_ENABLED(HANDOFF)
-	struct spl_handoff *ho = handoff_get();
+	struct spl_handoff *ho = gd->spl_handoff;
 
 	log_debug("usable_ram_top = %lx\n", ho->arch.usable_ram_top);
 
diff --git a/cmd/sb.c b/cmd/sb.c
index 9245052..79f3fb0 100644
--- a/cmd/sb.c
+++ b/cmd/sb.c
@@ -15,10 +15,8 @@
 			 char *const argv[])
 {
 #if CONFIG_IS_ENABLED(HANDOFF)
-	struct spl_handoff *handoff = handoff_get();
-
-	if (handoff)
-		printf("SPL handoff magic %lx\n", handoff->arch.magic);
+	if (gd->spl_handoff)
+		printf("SPL handoff magic %lx\n", gd->spl_handoff->arch.magic);
 	else
 		printf("SPL handoff info not received\n");
 
diff --git a/common/board_f.c b/common/board_f.c
index 98dc259..939697d 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -305,6 +305,17 @@
 	return 0;
 }
 
+static int setup_spl_handoff(void)
+{
+#if CONFIG_IS_ENABLED(HANDOFF)
+	gd->spl_handoff = bloblist_find(BLOBLISTT_U_BOOT_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;
@@ -880,6 +891,7 @@
 	initf_bootstage,	/* uses its own timer, so does not need DM */
 	event_init,
 	bloblist_maybe_init,
+	setup_spl_handoff,
 #if defined(CONFIG_CONSOLE_RECORD_INIT_F)
 	console_record_init,
 #endif
diff --git a/common/init/handoff.c b/common/init/handoff.c
index 86c020e..a7cd065 100644
--- a/common/init/handoff.c
+++ b/common/init/handoff.c
@@ -5,7 +5,6 @@
  * Copyright 2018 Google, Inc
  */
 
-#include <bloblist.h>
 #include <handoff.h>
 #include <asm/global_data.h>
 
@@ -39,14 +38,3 @@
 		bd->bi_dram[i].size = ho->ram_bank[i].size;
 	}
 }
-
-struct spl_handoff *handoff_get(void)
-{
-	struct spl_handoff *handoff;
-
-	handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF,
-				sizeof(struct spl_handoff));
-	debug("Found SPL hand-off info %p\n", handoff);
-
-	return handoff;
-}
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index 155ea8d..6e87db1 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -8,7 +8,6 @@
 #include <dm.h>
 #include <dt-structs.h>
 #include <errno.h>
-#include <handoff.h>
 #include <log.h>
 #include <malloc.h>
 #include <mapmem.h>
@@ -1468,7 +1467,7 @@
 	init_clocks = true;
 #elif CONFIG_IS_ENABLED(HANDOFF)
 	if (!(gd->flags & GD_FLG_RELOC)) {
-		if (!handoff_get())
+		if (!(gd->spl_handoff))
 			init_clocks = true;
 	}
 #endif
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 26277b9..789adf2 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -400,6 +400,12 @@
 	 */
 	struct bloblist_hdr *bloblist;
 #endif
+#if CONFIG_IS_ENABLED(HANDOFF)
+	/**
+	 * @spl_handoff: SPL hand-off information
+	 */
+	struct spl_handoff *spl_handoff;
+#endif
 #if defined(CONFIG_TRANSLATION_OFFSET)
 	/**
 	 * @translation_offset: optional translation offset
diff --git a/include/handoff.h b/include/handoff.h
index 0072ea8..c0ae7b1 100644
--- a/include/handoff.h
+++ b/include/handoff.h
@@ -32,13 +32,6 @@
 void handoff_load_dram_banks(struct spl_handoff *ho);
 
 /**
- * handoff_get() - Get the SPL handoff information
- *
- * Return: Pointer to SPL handoff if received, else NULL
- */
-struct spl_handoff *handoff_get(void);
-
-/**
  * handoff_arch_save() - Save arch-specific info into the handoff area
  *
  * This is defined to an empty function by default, but arch-specific code can