summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-08-04 10:16:27 -0400
committerTom Rini <trini@ti.com>2014-08-04 10:16:27 -0400
commitaa159e681ec22a19ee4dd68ad4ec08b748e14d10 (patch)
tree4e8bc63446a7300921c7b09141789ba8aaf9dda4 /arch
parent6e7b7df4df435742fcfde5f384760ae1bda2e39c (diff)
parent76a1e584e10d14f1981f65376636ecff80bdc19b (diff)
downloadtalos-obmc-uboot-aa159e681ec22a19ee4dd68ad4ec08b748e14d10.tar.gz
talos-obmc-uboot-aa159e681ec22a19ee4dd68ad4ec08b748e14d10.zip
Merge http://git.denx.de/u-boot-dm
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/config.h2
-rw-r--r--arch/arm/lib/crt0.S12
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h
index d3433dafd9..5f2a5f4ea9 100644
--- a/arch/arm/include/asm/config.h
+++ b/arch/arm/include/asm/config.h
@@ -7,7 +7,9 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
+#ifdef __aarch64__
#define CONFIG_SYS_GENERIC_GLOBAL_DATA
+#endif
#define CONFIG_LMB
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index dfc2de9a61..29cdad0f70 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -67,10 +67,22 @@ ENTRY(_main)
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
#endif
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
+ mov r2, sp
sub sp, sp, #GD_SIZE /* allocate one GD above SP */
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
mov r9, sp /* GD is above SP */
+ mov r1, sp
mov r0, #0
+clr_gd:
+ cmp r1, r2 /* while not at end of GD */
+ strlo r0, [r1] /* clear 32-bit GD word */
+ addlo r1, r1, #4 /* move to next */
+ blo clr_gd
+#if defined(CONFIG_SYS_MALLOC_F_LEN) && !defined(CONFIG_SPL_BUILD)
+ sub sp, sp, #CONFIG_SYS_MALLOC_F_LEN
+ str sp, [r9, #GD_MALLOC_BASE]
+#endif
+ /* mov r0, #0 not needed due to above code */
bl board_init_f
#if ! defined(CONFIG_SPL_BUILD)
OpenPOWER on IntegriCloud