summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-11-10 17:16:46 -0700
committerSimon Glass <sjg@chromium.org>2014-11-21 08:12:55 +0100
commit1151651831ff11b3f40d132bb9ab012e95a8faa1 (patch)
treed447f9186345abffb1c3b42fd179cfc9d5c16ee5 /common/spl
parentfb4f5e7c911745de1a6c7d0051abca9d2a4cd920 (diff)
downloadu-boot-imx-1151651831ff11b3f40d132bb9ab012e95a8faa1.zip
u-boot-imx-1151651831ff11b3f40d132bb9ab012e95a8faa1.tar.gz
u-boot-imx-1151651831ff11b3f40d132bb9ab012e95a8faa1.tar.bz2
dm: spl: Allow driver model to be used
When enabled, set up driver model for SPL. This allows SPL to use the same drivers as the main U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 6b90ad8..3cd19f0 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -7,6 +7,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <dm.h>
#include <spl.h>
#include <asm/u-boot.h>
#include <nand.h>
@@ -15,6 +16,7 @@
#include <i2c.h>
#include <image.h>
#include <malloc.h>
+#include <dm/root.h>
#include <linux/compiler.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -147,6 +149,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
gd->malloc_limit = gd->malloc_base + CONFIG_SYS_MALLOC_F_LEN;
gd->malloc_ptr = 0;
#endif
+#ifdef CONFIG_SPL_DM
+ dm_init_and_scan(true);
+#endif
#ifndef CONFIG_PPC
/*