summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-09-30 10:40:17 -0700
committerSimon Glass <sjg@chromium.org>2011-10-04 15:12:30 -0700
commit9ce0de3176125de751d179176947940f0041ae7e (patch)
treed9ab2a64142abb15159be96051de90e87894f6a9 /arch
parentbebb0b274bdea91623e33210f8ac9c4ac6864b9d (diff)
tegra: Build early code for ARMv4T
The Tegra family has an ARMv4T chip which runs board_init_f(). It does not support the BLX instruction which the init_sequence function table generates. The easiest fix is to build this file for ARMv4T on Tegra. The alternative is to move the arch_cpu_init() call out of the init sequence. But that fix would not make the reason for the change so obvious. There is no code size impact. BUG=chromium-os:19353 TEST=build and boot on Seaboard Change-Id: Idb0ab17bd0839c472cda7bf4940522245792e328 Reviewed-on: http://gerrit.chromium.org/gerrit/8684 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/tegra-common/Makefile2
-rw-r--r--arch/arm/lib/Makefile6
-rw-r--r--arch/arm/lib/board.c9
3 files changed, 8 insertions, 9 deletions
diff --git a/arch/arm/cpu/armv7/tegra-common/Makefile b/arch/arm/cpu/armv7/tegra-common/Makefile
index 8d22a66111..577a342694 100644
--- a/arch/arm/cpu/armv7/tegra-common/Makefile
+++ b/arch/arm/cpu/armv7/tegra-common/Makefile
@@ -21,6 +21,8 @@
# MA 02111-1307 USA
#
+# The AVP is ARMv4T architecture so we must use special compiler
+# flags for any files it might use.
CFLAGS_arch/arm/cpu/armv7/tegra-common/ap20.o += -march=armv4t
CFLAGS_arch/arm/cpu/armv7/tegra-common/clock.o += -march=armv4t
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index e52d073c82..7e2e01f3e5 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -23,6 +23,12 @@
include $(TOPDIR)/config.mk
+# Tegra has an ARMv4T CPU which runs board_init_f(), so we must build this
+# file with compatible flags
+ifdef CONFIG_TEGRA
+CFLAGS_arch/arm/lib/board.o += -march=armv4t
+endif
+
LIB = $(obj)lib$(ARCH).o
LIBGCC = $(obj)libgcc.o
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 460b68ae00..18fd561726 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -292,15 +292,6 @@ void board_init_f (ulong bootflag)
extern u8 _binary_dt_dtb_start[];
#endif
-#ifdef CONFIG_TEGRA2
- /*
- * Call this now in case we are running on the AVP, since it doesn't
- * support the BLX instruction generated by the init sequence. It
- * won't return on AVP, since the AVP halts and the A9 CPU wakes up
- * and starts at its reset vector, etc.
- */
- arch_cpu_init();
-#endif
bootstage_mark(BOOTSTAGE_START_UBOOT_F, "board_init_f start");
/* Pointer is writable since we allocated a register for it */