diff options
author | Simon Glass <sjg@chromium.org> | 2011-09-30 10:40:17 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-10-04 15:12:30 -0700 |
commit | 9ce0de3176125de751d179176947940f0041ae7e (patch) | |
tree | d9ab2a64142abb15159be96051de90e87894f6a9 /arch/arm | |
parent | bebb0b274bdea91623e33210f8ac9c4ac6864b9d (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/arm')
-rw-r--r-- | arch/arm/cpu/armv7/tegra-common/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/lib/Makefile | 6 | ||||
-rw-r--r-- | arch/arm/lib/board.c | 9 |
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 8d22a661115..577a342694d 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 e52d073c820..7e2e01f3e55 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 460b68ae002..18fd561726f 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 */ |