summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-02-27 22:06:37 -0700
committerSimon Glass <sjg@chromium.org>2015-04-23 09:05:53 -0600
commit293f16b1e7f6006f192950a94830e3a14c979c4d (patch)
treeb389a31fba89d95fa6cfd65830d3058c11561404 /common
parentfb5cf7f16be725aec7ab0016268b3b4e26460bee (diff)
downloadu-boot-imx-293f16b1e7f6006f192950a94830e3a14c979c4d.zip
u-boot-imx-293f16b1e7f6006f192950a94830e3a14c979c4d.tar.gz
u-boot-imx-293f16b1e7f6006f192950a94830e3a14c979c4d.tar.bz2
Correct malloc_limit value for pre-relocation malloc()
The limit is measured from the start of the malloc() area and is not an absolute address. Correct this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 8e1fb40..af1336c 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -158,7 +158,7 @@ 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