summaryrefslogtreecommitdiff
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-01-30 15:46:43 +0100
committerMichal Simek <michal.simek@xilinx.com>2015-02-09 15:13:12 +0100
commit405e651d705e197babe423ef88e8224e2737fc06 (patch)
tree8e46f7b885169ce2ce535d25e500334bbce82ece /arch/microblaze
parent0510b14b73cbe7e1c2b43272c7a3210af21dff31 (diff)
downloadu-boot-imx-405e651d705e197babe423ef88e8224e2737fc06.zip
u-boot-imx-405e651d705e197babe423ef88e8224e2737fc06.tar.gz
u-boot-imx-405e651d705e197babe423ef88e8224e2737fc06.tar.bz2
microblaze: Add support for CONFIG_SYS_MALLOC_F_LEN
Create space for dm_init where calloc is called and malloc_base has to be initialized. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/cpu/start.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 3eeeab4..cf9ee7e 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -30,7 +30,11 @@ _start:
mts rshr, r1
addi r1, r1, -4 /* Decrement SP to top of memory */
#else
+#if defined(CONFIG_SYS_MALLOC_F_LEN)
+ addi r1, r0, CONFIG_SYS_INIT_SP_OFFSET - CONFIG_SYS_MALLOC_F_LEN
+#else
addi r1, r0, CONFIG_SYS_INIT_SP_OFFSET
+#endif
mts rshr, r1
addi r1, r1, -4 /* Decrement SP to top of memory */
@@ -152,6 +156,10 @@ clear_bss:
#ifndef CONFIG_SPL_BUILD
or r5, r0, r0 /* flags - empty */
addi r31, r0, _gd
+#if defined(CONFIG_SYS_MALLOC_F_LEN)
+ addi r6, r0, CONFIG_SYS_INIT_SP_OFFSET
+ swi r6, r31, GD_MALLOC_BASE
+#endif
brai board_init_f
#else
addi r31, r0, CONFIG_SYS_SPL_MALLOC_END