diff options
author | Tom Rini <trini@konsulko.com> | 2015-04-23 13:53:09 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-04-23 14:56:10 -0400 |
commit | 5f757cdcc6efbefec09b8f964a234f84ff9fa7f6 (patch) | |
tree | e8058651bd0319757d33fb7a949b9491211de7c7 /common/spl | |
parent | bba97cd2c96ae0c21ad916a9c4eb363fe569a2f9 (diff) | |
parent | f3d46bd658ef4df575ec26c29e472ac858723159 (diff) | |
download | u-boot-imx-5f757cdcc6efbefec09b8f964a234f84ff9fa7f6.zip u-boot-imx-5f757cdcc6efbefec09b8f964a234f84ff9fa7f6.tar.gz u-boot-imx-5f757cdcc6efbefec09b8f964a234f84ff9fa7f6.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-dm
Diffstat (limited to 'common/spl')
-rw-r--r-- | common/spl/spl.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 8e1fb40..6a02c9e 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -151,6 +151,8 @@ static void spl_ram_load_image(void) void board_init_r(gd_t *dummy1, ulong dummy2) { u32 boot_device; + int ret; + debug(">>spl:board_init_r()\n"); #if defined(CONFIG_SYS_SPL_MALLOC_START) @@ -158,12 +160,24 @@ void board_init_r(gd_t *dummy1, ulong dummy2) CONFIG_SYS_SPL_MALLOC_SIZE); gd->flags |= GD_FLG_FULL_MALLOC_INIT; #elif defined(CONFIG_SYS_MALLOC_F_LEN) - gd->malloc_limit = gd->malloc_base + CONFIG_SYS_MALLOC_F_LEN; + gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN; gd->malloc_ptr = 0; #endif -#ifdef CONFIG_SPL_DM - dm_init_and_scan(true); -#endif + if (IS_ENABLED(CONFIG_OF_CONTROL) && + !IS_ENABLED(CONFIG_SPL_DISABLE_OF_CONTROL)) { + ret = fdtdec_setup(); + if (ret) { + debug("fdtdec_setup() returned error %d\n", ret); + hang(); + } + } + if (IS_ENABLED(CONFIG_SPL_DM)) { + ret = dm_init_and_scan(true); + if (ret) { + debug("dm_init_and_scan() returned error %d\n", ret); + hang(); + } + } #ifndef CONFIG_PPC /* |