]> git.sur5r.net Git - u-boot/commitdiff
arm: make sure board_init_r() is being called using the right mode (ARM / THUMB)
authorDavid Müller (ELSOFT AG) <d.mueller@elsoft.ch>
Tue, 9 Feb 2016 15:48:28 +0000 (16:48 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 15 Feb 2016 17:04:45 +0000 (12:04 -0500)
Signed-off-by: David Müller <d.mueller@elsoft.ch>
arch/arm/lib/crt0.S

index 2f4c14e96bffac92f02a531932783c8b888adff0..8415f77e1b1e02b5159b3059dd19c572ccb16098 100644 (file)
@@ -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