summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-10-12 13:36:58 -0400
committerTom Rini <trini@konsulko.com>2017-10-12 13:36:58 -0400
commit26f9184e094541b672f83f23652e2e737d5d0729 (patch)
tree691d6cb0965ae8fb01f8be9694076176666f8ab3 /common
parente11d2fff73b5c0e04027b55020a0a56d9dc72aa4 (diff)
parent23af484b0156baaafd578222d73513418df78f09 (diff)
Merge git://git.denx.de/u-boot-fsl-qoriq
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4afbe97fc1..aaddddd995 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -258,6 +258,12 @@ static int spl_common_init(bool setup_malloc)
return 0;
}
+void spl_set_bd(void)
+{
+ if (!gd->bd)
+ gd->bd = &bdata;
+}
+
int spl_early_init(void)
{
int ret;
@@ -365,7 +371,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
struct spl_image_info spl_image;
debug(">>spl:board_init_r()\n");
- gd->bd = &bdata;
+
+ spl_set_bd();
+
#ifdef CONFIG_SPL_OS_BOOT
dram_init_banksize();
#endif