From: =?UTF-8?q?David=20M=C3=BCller?= Date: Tue, 9 Feb 2016 16:48:28 +0100 Subject: [U-Boot] [PATCH 1/4] arm: make sure board_init_r() is being called using the right mode (ARM / THUMB) In-Reply-To: <1455032911-29001-1-git-send-email-d.mueller@elsoft.ch> References: <1455032911-29001-1-git-send-email-d.mueller@elsoft.ch> Message-ID: <1455032911-29001-2-git-send-email-d.mueller@elsoft.ch> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: David M?ller --- arch/arm/lib/crt0.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index 2f4c14e..8415f77 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -167,8 +167,12 @@ clbss_l:cmp r0, r1 /* while not at end of BSS */ mov r0, r9 /* gd_t */ ldr r1, [r9, #GD_RELOCADDR] /* dest_addr */ /* call board_init_r */ +#if defined(CONFIG_SYS_THUMB_BUILD) + ldr lr, =board_init_r /* this is auto-relocated! */ + bx lr +#else ldr pc, =board_init_r /* this is auto-relocated! */ - +#endif /* we should not return here. */ #endif -- 1.8.4