[U-Boot] [PATCH 1/1] arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD

Tom Rini trini at konsulko.com
Mon Mar 6 18:50:10 UTC 2017


Today, we have cases where we wish to build all of U-Boot in Thumb2 mode for
various reasons.  We also have cases where we only build SPL in Thumb2 mode due
to size constraints and wish to build the rest of the system in ARM mode.  So
in this migration we introduce a new symbol as well, SPL_SYS_THUMB_BUILD to
control if we build everything or just SPL (or in theory, just U-Boot) in
Thumb2 mode.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 Makefile                                |  5 +++--
 README                                  |  8 --------
 arch/arm/Kconfig                        | 30 ++++++++++++++++++++++++++++++
 arch/arm/config.mk                      |  8 +++-----
 arch/arm/cpu/arm920t/Makefile           |  2 +-
 arch/arm/cpu/arm926ejs/Makefile         |  2 +-
 arch/arm/cpu/arm926ejs/cache.c          |  2 +-
 arch/arm/cpu/armv7/cache_v7_asm.S       |  2 +-
 arch/arm/cpu/pxa/cache.c                |  2 +-
 arch/arm/include/asm/assembler.h        |  2 +-
 arch/arm/include/asm/cache.h            |  2 +-
 arch/arm/include/asm/setjmp.h           |  2 +-
 arch/arm/lib/Makefile                   |  2 +-
 arch/arm/lib/cache.c                    |  2 +-
 arch/arm/lib/crt0.S                     |  2 +-
 arch/arm/lib/lib1funcs.S                |  2 +-
 arch/arm/lib/memcpy.S                   |  2 +-
 arch/arm/lib/memset.S                   |  2 +-
 arch/arm/mach-at91/arm926ejs/Makefile   |  8 ++++++++
 arch/arm/mach-orion5x/Makefile          |  2 +-
 configs/am335x_evm_norboot_defconfig    |  1 +
 configs/am3517_crane_defconfig          |  1 +
 configs/am3517_evm_defconfig            |  1 +
 configs/am43xx_evm_qspiboot_defconfig   |  1 +
 configs/apalis_imx6_defconfig           |  1 +
 configs/apalis_imx6_nospl_com_defconfig |  1 +
 configs/apalis_imx6_nospl_it_defconfig  |  1 +
 configs/axm_defconfig                   |  1 +
 configs/bk4r1_defconfig                 |  1 +
 configs/cgtqmx6eval_defconfig           |  1 +
 configs/cm_fx6_defconfig                |  1 +
 configs/cm_t3517_defconfig              |  1 +
 configs/cm_t35_defconfig                |  1 +
 configs/cm_t43_defconfig                |  1 +
 configs/colibri_imx6_defconfig          |  1 +
 configs/colibri_imx6_nospl_defconfig    |  1 +
 configs/colibri_imx7_defconfig          |  1 +
 configs/colibri_vf_defconfig            |  1 +
 configs/eco5pk_defconfig                |  1 +
 configs/gwventana_defconfig             |  1 +
 configs/highbank_defconfig              |  1 +
 configs/imx6dl_icore_mmc_defconfig      |  1 +
 configs/imx6dl_icore_nand_defconfig     |  1 +
 configs/imx6dl_icore_rqs_mmc_defconfig  |  1 +
 configs/imx6q_icore_mmc_defconfig       |  1 +
 configs/imx6q_icore_nand_defconfig      |  1 +
 configs/imx6q_icore_rqs_mmc_defconfig   |  1 +
 configs/imx6ul_geam_mmc_defconfig       |  1 +
 configs/imx6ul_geam_nand_defconfig      |  1 +
 configs/liteboard_defconfig             |  1 +
 configs/mccmon6_nor_defconfig           |  1 +
 configs/mccmon6_sd_defconfig            |  1 +
 configs/mcx_defconfig                   |  1 +
 configs/mt_ventoux_defconfig            |  1 +
 configs/mx6cuboxi_defconfig             |  1 +
 configs/mx6sabresd_spl_defconfig        |  1 +
 configs/mx6slevk_spl_defconfig          |  1 +
 configs/mx6sxsabresd_spl_defconfig      |  1 +
 configs/mx6ul_14x14_evk_defconfig       |  1 +
 configs/mx6ul_9x9_evk_defconfig         |  1 +
 configs/nokia_rx51_defconfig            |  1 +
 configs/novena_defconfig                |  1 +
 configs/omap3_evm_defconfig             |  1 +
 configs/omap3_ha_defconfig              |  1 +
 configs/openrd_base_defconfig           |  1 +
 configs/openrd_client_defconfig         |  1 +
 configs/openrd_ultimate_defconfig       |  1 +
 configs/ot1200_spl_defconfig            |  1 +
 configs/pcm052_defconfig                |  1 +
 configs/pcm058_defconfig                |  1 +
 configs/platinum_picon_defconfig        |  1 +
 configs/platinum_titanium_defconfig     |  1 +
 configs/smartweb_defconfig              |  1 +
 configs/sniper_defconfig                |  1 +
 configs/tao3530_defconfig               |  1 +
 configs/taurus_defconfig                |  1 +
 configs/tbs2910_defconfig               |  1 +
 configs/twister_defconfig               |  1 +
 configs/udoo_defconfig                  |  1 +
 configs/udoo_neo_defconfig              |  1 +
 configs/wandboard_defconfig             |  1 +
 configs/x600_defconfig                  |  1 +
 configs/xpress_spl_defconfig            |  1 +
 configs/zc5202_defconfig                |  1 +
 configs/zc5601_defconfig                |  1 +
 include/configs/apalis_imx6.h           |  1 -
 include/configs/colibri_imx6.h          |  1 -
 include/configs/colibri_imx7.h          |  2 --
 include/configs/colibri_vf.h            |  1 -
 include/configs/highbank.h              |  1 -
 include/configs/imx6_spl.h              |  1 -
 include/configs/kc1.h                   |  2 --
 include/configs/openrd.h                |  1 -
 include/configs/pcm052.h                |  2 --
 include/configs/rcar-gen2-common.h      |  2 --
 include/configs/rk3036_common.h         |  1 -
 include/configs/rk3288_common.h         |  1 -
 include/configs/smartweb.h              |  1 -
 include/configs/socfpga_common.h        |  2 --
 include/configs/stm32f429-discovery.h   |  1 -
 include/configs/stm32f746-disco.h       |  2 --
 include/configs/sunxi-common.h          |  7 -------
 include/configs/taurus.h                |  1 -
 include/configs/tbs2910.h               |  1 -
 include/configs/ti_armv7_common.h       |  2 --
 include/configs/ti_omap4_common.h       |  2 --
 include/configs/tricorder.h             |  1 -
 include/configs/x600.h                  |  1 -
 108 files changed, 124 insertions(+), 67 deletions(-)

diff --git a/Makefile b/Makefile
index 7cbb610..b182f15 100644
--- a/Makefile
+++ b/Makefile
@@ -624,8 +624,9 @@ KBUILD_CFLAGS += $(KCFLAGS)
 UBOOTINCLUDE    := \
 		-Iinclude \
 		$(if $(KBUILD_SRC), -I$(srctree)/include) \
-		$(if $(CONFIG_SYS_THUMB_BUILD), $(if $(CONFIG_HAS_THUMB2),, \
-			-I$(srctree)/arch/$(ARCH)/thumb1/include),) \
+		$(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \
+			$(if $(CONFIG_HAS_THUMB2),, \
+				-I$(srctree)/arch/$(ARCH)/thumb1/include),) \
 		-I$(srctree)/arch/$(ARCH)/include \
 		-include $(srctree)/include/linux/kconfig.h
 
diff --git a/README b/README
index 4f0dbd4..0138c03 100644
--- a/README
+++ b/README
@@ -592,14 +592,6 @@ The following options need to be configured:
 		Select high exception vectors of the ARM core, e.g., do not
 		clear the V bit of the c1 register of CP15.
 
-		CONFIG_SYS_THUMB_BUILD
-
-		Use this flag to build U-Boot using the Thumb instruction
-		set for ARM architectures. Thumb instruction set provides
-		better code density. For ARM architectures that support
-		Thumb2 this flag will result in Thumb2 code generated by
-		GCC.
-
 		CONFIG_ARM_ERRATA_716044
 		CONFIG_ARM_ERRATA_742230
 		CONFIG_ARM_ERRATA_743622
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e84b74e..6806a8a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -112,6 +112,25 @@ config SEMIHOSTING
 	  the hosted environment to call out to the emulator to
 	  retrieve files from the host machine.
 
+config SYS_THUMB_BUILD
+	bool "Build U-Boot using the Thumb instruction set"
+	depends on !ARM64
+	help
+	   Use this flag to build U-Boot using the Thumb instruction set for
+	   ARM architectures. Thumb instruction set provides better code
+	   density. For ARM architectures that support Thumb2 this flag will
+	   result in Thumb2 code generated by GCC.
+
+config SPL_SYS_THUMB_BUILD
+	bool "Build SPL using the Thumb instruction set"
+	default y if SYS_THUMB_BUILD
+	depends on !ARM64
+	help
+	   Use this flag to build SPL using the Thumb instruction set for
+	   ARM architectures. Thumb instruction set provides better code
+	   density. For ARM architectures that support Thumb2 this flag will
+	   result in Thumb2 code generated by GCC.
+
 config SYS_L2CACHE_OFF
 	bool "L2cache off"
 	help
@@ -502,6 +521,7 @@ config ARCH_KEYSTONE
 	bool "TI Keystone"
 	select CPU_V7
 	select SUPPORT_SPL
+	select SYS_THUMB_BUILD
 	select CMD_POWEROFF
 
 config ARCH_MESON
@@ -569,20 +589,24 @@ config TARGET_MX53SMD
 config OMAP34XX
 	bool "OMAP34XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	select USE_TINY_PRINTF
 
 config OMAP44XX
 	bool "OMAP44XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	select USE_TINY_PRINTF
 
 config OMAP54XX
 	bool "OMAP54XX SoC"
 	select ARCH_OMAP2
+	select SYS_THUMB_BUILD
 
 config AM43XX
 	bool "AM43XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	help
 	  Support for AM43xx SOC from Texas Instruments.
 	  The AM43xx high performance SOC features a Cortex-A9
@@ -593,6 +617,7 @@ config AM43XX
 config AM33XX
 	bool "AM33XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	help
 	  Support for AM335x SOC from Texas Instruments.
 	  The AM335x high performance SOC features a Cortex-A8
@@ -605,6 +630,7 @@ config ARCH_RMOBILE
 	select DM
 	select DM_SERIAL
 	select BOARD_EARLY_INIT_F
+	select SYS_THUMB_BUILD
 
 config TARGET_S32V234EVB
 	bool "Support s32v234evb"
@@ -634,6 +660,7 @@ config ARCH_SOCFPGA
 	select ARCH_EARLY_INIT_R
 	select ARCH_MISC_INIT
 	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
+	select SYS_THUMB_BUILD
 
 config TARGET_CM_T43
 	bool "Support cm_t43"
@@ -656,6 +683,7 @@ config ARCH_SUNXI
 	select SPL_STACK_R if SUPPORT_SPL
 	select SPL_SYS_MALLOC_SIMPLE if SUPPORT_SPL
 	select SYS_NS16550
+	select SPL_SYS_THUMB_BUILD if !ARM64
 	select USB if DISTRO_DEFAULTS
 	select USB_STORAGE if DISTRO_DEFAULTS
 	select USB_KEYBOARD if DISTRO_DEFAULTS
@@ -982,6 +1010,7 @@ config STM32
 	select CPU_V7M
 	select DM
 	select DM_SERIAL
+	select SYS_THUMB_BUILD
 
 config ARCH_ROCKCHIP
 	bool "Support Rockchip SoCs"
@@ -990,6 +1019,7 @@ config ARCH_ROCKCHIP
 	select DM
 	select SPL_DM if SPL
 	select SYS_MALLOC_F
+	select SYS_THUMB_BUILD if !ARM64
 	select SPL_SYS_MALLOC_SIMPLE if SPL
 	select DM_GPIO
 	select DM_I2C
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 3a81f13..08d7d1b 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -31,7 +31,7 @@ PLATFORM_RELFLAGS	+= $(LLVM_RELFLAGS)
 PLATFORM_CPPFLAGS += -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
-ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
 AFLAGS_IMPLICIT_IT	:= $(call as-option,-Wa$(comma)-mimplicit-it=always)
 PF_CPPFLAGS_ARM		:= $(AFLAGS_IMPLICIT_IT) \
 			$(call cc-option, -mthumb -mthumb-interwork,\
@@ -44,8 +44,7 @@ PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \
 endif
 
 # Only test once
-ifneq ($(CONFIG_SPL_BUILD),y)
-ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
 archprepare: checkthumb
 
 checkthumb:
@@ -57,7 +56,6 @@ checkthumb:
 		false; \
 	fi
 endif
-endif
 
 # Try if EABI is supported, else fall back to old API,
 # i. e. for example:
@@ -99,7 +97,7 @@ LDFLAGS_u-boot += -pie
 #
 # http://sourceware.org/bugzilla/show_bug.cgi?id=12532
 #
-ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
 ifeq ($(GAS_BUG_12532),)
 export GAS_BUG_12532:=$(shell if [ $(call binutils-version) -lt 0222 ] ; \
 	then echo y; else echo n; fi)
diff --git a/arch/arm/cpu/arm920t/Makefile b/arch/arm/cpu/arm920t/Makefile
index 1832b9d..7aa432a 100644
--- a/arch/arm/cpu/arm920t/Makefile
+++ b/arch/arm/cpu/arm920t/Makefile
@@ -16,6 +16,6 @@ obj-$(CONFIG_S3C24X0) += s3c24x0/
 
 # some files can only build in ARM mode
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 CFLAGS_cpu.o := -marm
 endif
diff --git a/arch/arm/cpu/arm926ejs/Makefile b/arch/arm/cpu/arm926ejs/Makefile
index fe78922..0f73011 100644
--- a/arch/arm/cpu/arm926ejs/Makefile
+++ b/arch/arm/cpu/arm926ejs/Makefile
@@ -23,7 +23,7 @@ obj-$(if $(filter spear,$(SOC)),y) += spear/
 
 # some files can only build in ARM or THUMB2, not THUMB1
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 ifndef CONFIG_HAS_THUMB2
 
 CFLAGS_cpu.o := -marm
diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index 02cb24c..d56e594 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -63,6 +63,6 @@ void flush_dcache_all(void)
 
 __weak void l2_cache_disable(void) {}
 
-#if defined CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 __weak void invalidate_l2_cache(void) {}
 #endif
diff --git a/arch/arm/cpu/armv7/cache_v7_asm.S b/arch/arm/cpu/armv7/cache_v7_asm.S
index a433628..bd27ab2 100644
--- a/arch/arm/cpu/armv7/cache_v7_asm.S
+++ b/arch/arm/cpu/armv7/cache_v7_asm.S
@@ -7,7 +7,7 @@
 #include <linux/sizes.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 #define ARM(x...)
 #define THUMB(x...)	x
 #else
diff --git a/arch/arm/cpu/pxa/cache.c b/arch/arm/cpu/pxa/cache.c
index d26354e..30e1e34 100644
--- a/arch/arm/cpu/pxa/cache.c
+++ b/arch/arm/cpu/pxa/cache.c
@@ -52,6 +52,6 @@ void flush_dcache_all(void)
 
 __weak void l2_cache_disable(void) {}
 
-#if defined CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 __weak void invalidate_l2_cache(void) {}
 #endif
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index c56daf2..471a408 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -77,7 +77,7 @@
  * We disable it especially for Thumb builds since those instructions
  * are not made in a Thumb ready way...
  */
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 #define CALGN(code...)
 #else
 #define CALGN(code...) code
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index 5400cbe..fac65d8 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -16,7 +16,7 @@
 /*
  * Invalidate L2 Cache using co-proc instruction
  */
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 void invalidate_l2_cache(void);
 #else
 static inline void invalidate_l2_cache(void)
diff --git a/arch/arm/include/asm/setjmp.h b/arch/arm/include/asm/setjmp.h
index df9934b..c3399a7 100644
--- a/arch/arm/include/asm/setjmp.h
+++ b/arch/arm/include/asm/setjmp.h
@@ -39,7 +39,7 @@ static inline int setjmp(jmp_buf jmp)
 		  "x30", "cc", "memory");
 #else
 	asm volatile(
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 		".align 2\n"
 		"adr r0, jmp_target\n"
 		"add r0, r0, $1\n"
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 166fa9e..b95e105 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -71,7 +71,7 @@ asflags-y += -DCONFIG_ARM_ASM_UNIFIED
 
 # some files can only build in ARM or THUMB2, not THUMB1
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 asflags-$(CONFIG_HAS_THUMB2) += -DCONFIG_THUMB2_KERNEL
 ifndef CONFIG_HAS_THUMB2
 
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 4f72f89..7683386 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -107,7 +107,7 @@ phys_addr_t noncached_alloc(size_t size, size_t align)
 }
 #endif /* CONFIG_SYS_NONCACHED_MEMORY */
 
-#if defined(CONFIG_SYS_THUMB_BUILD)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 void invalidate_l2_cache(void)
 {
 	unsigned int val = 0;
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index 8415f77..8d2eeb8 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -167,7 +167,7 @@ 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)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 	ldr	lr, =board_init_r	/* this is auto-relocated! */
 	bx	lr
 #else
diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S
index 76968ce..6e29cbf 100644
--- a/arch/arm/lib/lib1funcs.S
+++ b/arch/arm/lib/lib1funcs.S
@@ -368,7 +368,7 @@ ENDPROC(Ldiv0)
 .popsection
 
 /* Thumb-1 specialities */
-#if defined(CONFIG_SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2)
 .pushsection .text.__gnu_thumb1_case_sqi, "ax"
 ENTRY(__gnu_thumb1_case_sqi)
 	push	{r1}
diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S
index 00602e9..588b3f8 100644
--- a/arch/arm/lib/memcpy.S
+++ b/arch/arm/lib/memcpy.S
@@ -56,7 +56,7 @@
 
 /* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
 	.syntax unified
-#if defined(CONFIG_SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD)
 	.thumb
 	.thumb_func
 #endif
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
index df053a3..cc4cc44 100644
--- a/arch/arm/lib/memset.S
+++ b/arch/arm/lib/memset.S
@@ -16,7 +16,7 @@
 	.align	5
 
 	.syntax unified
-#if defined(CONFIG_SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD)
 	.thumb
 	.thumb_func
 #endif
diff --git a/arch/arm/mach-at91/arm926ejs/Makefile b/arch/arm/mach-at91/arm926ejs/Makefile
index d36e15a..624ccd7 100644
--- a/arch/arm/mach-at91/arm926ejs/Makefile
+++ b/arch/arm/mach-at91/arm926ejs/Makefile
@@ -27,3 +27,11 @@ obj-y	+= timer.o
 ifndef CONFIG_SKIP_LOWLEVEL_INIT
 obj-y	+= lowlevel_init.o
 endif
+
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
+ifndef CONFIG_HAS_THUMB2
+
+CFLAGS_cache.o := -marm
+
+endif
+endif
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile
index 33dcad4..5249aa8 100644
--- a/arch/arm/mach-orion5x/Makefile
+++ b/arch/arm/mach-orion5x/Makefile
@@ -19,7 +19,7 @@ endif
 
 # some files can only build in ARM or THUMB2, not THUMB1
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 ifndef CONFIG_HAS_THUMB2
 
 CFLAGS_cpu.o := -marm
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index f82ca16..cb61842 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_NOR=y
diff --git a/configs/am3517_crane_defconfig b/configs/am3517_crane_defconfig
index 125abff..8417709 100644
--- a/configs/am3517_crane_defconfig
+++ b/configs/am3517_crane_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_GPIO_SUPPORT is not set
 # CONFIG_SPL_EXT_SUPPORT is not set
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index be55f29..ca04ad6 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_GPIO_SUPPORT is not set
 # CONFIG_SPL_EXT_SUPPORT is not set
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index a9c8726..83546ed 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_AM43XX=y
 CONFIG_TARGET_AM43XX_EVM=y
 CONFIG_ISW_ENTRY_ADDR=0x30000000
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 6b2daa9..d673745 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/apalis_imx6_nospl_com_defconfig b/configs/apalis_imx6_nospl_com_defconfig
index 457d527..b0e0995 100644
--- a/configs/apalis_imx6_nospl_com_defconfig
+++ b/configs/apalis_imx6_nospl_com_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_APALIS_IMX6=y
 CONFIG_VIDEO=y
diff --git a/configs/apalis_imx6_nospl_it_defconfig b/configs/apalis_imx6_nospl_it_defconfig
index bdd4a67..231639e 100644
--- a/configs/apalis_imx6_nospl_it_defconfig
+++ b/configs/apalis_imx6_nospl_it_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_APALIS_IMX6=y
 CONFIG_VIDEO=y
diff --git a/configs/axm_defconfig b/configs/axm_defconfig
index 5b596a2..5c77a1d 100644
--- a/configs/axm_defconfig
+++ b/configs/axm_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SPL_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_AT91=y
diff --git a/configs/bk4r1_defconfig b/configs/bk4r1_defconfig
index 964cfed..1dff0d4 100644
--- a/configs/bk4r1_defconfig
+++ b/configs/bk4r1_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_BK4R1=y
 CONFIG_DEFAULT_DEVICE_TREE="bk4r1"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND"
diff --git a/configs/cgtqmx6eval_defconfig b/configs/cgtqmx6eval_defconfig
index 2e4ed36..25f7e2b 100644
--- a/configs/cgtqmx6eval_defconfig
+++ b/configs/cgtqmx6eval_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index dc7544a..ced70da 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
index 1997e56..0357b91 100644
--- a/configs/cm_t3517_defconfig
+++ b/configs/cm_t3517_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_CM_T3517=y
 CONFIG_BOOTDELAY=3
diff --git a/configs/cm_t35_defconfig b/configs/cm_t35_defconfig
index 9d23243..7f0e8b7 100644
--- a/configs/cm_t35_defconfig
+++ b/configs/cm_t35_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_CM_T35=y
diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig
index 3d0907b..eaa126d 100644
--- a/configs/cm_t43_defconfig
+++ b/configs/cm_t43_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_CM_T43=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index ba06a55..80fe549 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/colibri_imx6_nospl_defconfig b/configs/colibri_imx6_nospl_defconfig
index c75f7d4..7a82b48 100644
--- a/configs/colibri_imx6_nospl_defconfig
+++ b/configs/colibri_imx6_nospl_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_COLIBRI_IMX6=y
 CONFIG_VIDEO=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index 341c99d..5c051d5 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX7=y
 CONFIG_TARGET_COLIBRI_IMX7=y
 CONFIG_IMX_RDC=y
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 0a12e1a..6ba673d 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_COLIBRI_VF=y
 CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND"
diff --git a/configs/eco5pk_defconfig b/configs/eco5pk_defconfig
index cc8788d..f0fff1f 100644
--- a/configs/eco5pk_defconfig
+++ b/configs/eco5pk_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_ECO5PK=y
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 6cc5897..819ec3a 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/highbank_defconfig b/configs/highbank_defconfig
index 20801fc..041d048 100644
--- a/configs/highbank_defconfig
+++ b/configs/highbank_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_HIGHBANK=y
 CONFIG_FIT=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/imx6dl_icore_mmc_defconfig b/configs/imx6dl_icore_mmc_defconfig
index a74ae8b..a9767c4 100644
--- a/configs/imx6dl_icore_mmc_defconfig
+++ b/configs/imx6dl_icore_mmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig
index 69d6b56..c4eae5d 100644
--- a/configs/imx6dl_icore_nand_defconfig
+++ b/configs/imx6dl_icore_nand_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/imx6dl_icore_rqs_mmc_defconfig b/configs/imx6dl_icore_rqs_mmc_defconfig
index d9d4a0e..955c3c2 100644
--- a/configs/imx6dl_icore_rqs_mmc_defconfig
+++ b/configs/imx6dl_icore_rqs_mmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/imx6q_icore_mmc_defconfig b/configs/imx6q_icore_mmc_defconfig
index 9957e92..e49b6b4 100644
--- a/configs/imx6q_icore_mmc_defconfig
+++ b/configs/imx6q_icore_mmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig
index e9e41a0..8467c1c 100644
--- a/configs/imx6q_icore_nand_defconfig
+++ b/configs/imx6q_icore_nand_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/imx6q_icore_rqs_mmc_defconfig b/configs/imx6q_icore_rqs_mmc_defconfig
index 480a2a34..600ef38 100644
--- a/configs/imx6q_icore_rqs_mmc_defconfig
+++ b/configs/imx6q_icore_rqs_mmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/imx6ul_geam_mmc_defconfig b/configs/imx6ul_geam_mmc_defconfig
index 1d22460..2703239 100644
--- a/configs/imx6ul_geam_mmc_defconfig
+++ b/configs/imx6ul_geam_mmc_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig
index a4512c5..121b1ce 100644
--- a/configs/imx6ul_geam_nand_defconfig
+++ b/configs/imx6ul_geam_nand_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/liteboard_defconfig b/configs/liteboard_defconfig
index f096471..930dc8c 100644
--- a/configs/liteboard_defconfig
+++ b/configs/liteboard_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index 15cf8a6..7229faa 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig
index 23f0a31..52b80c5 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
diff --git a/configs/mcx_defconfig b/configs/mcx_defconfig
index c73b53c..90df70a 100644
--- a/configs/mcx_defconfig
+++ b/configs/mcx_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_GPIO_SUPPORT is not set
 # CONFIG_SPL_EXT_SUPPORT is not set
diff --git a/configs/mt_ventoux_defconfig b/configs/mt_ventoux_defconfig
index c035f40..faf76c0 100644
--- a/configs/mt_ventoux_defconfig
+++ b/configs/mt_ventoux_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_MT_VENTOUX=y
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 0b37be9..8dc0e83 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index a488979..3b9ea0b 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index 29e179d..822e97b 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/mx6sxsabresd_spl_defconfig b/configs/mx6sxsabresd_spl_defconfig
index f7cbc25..a3240f8 100644
--- a/configs/mx6sxsabresd_spl_defconfig
+++ b/configs/mx6sxsabresd_spl_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index 9f972c4..2c518d3 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig
index 7663709..fe9a88c 100644
--- a/configs/mx6ul_9x9_evk_defconfig
+++ b/configs/mx6ul_9x9_evk_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index 0b8fccf..181bdb1 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_NOKIA_RX51=y
 CONFIG_VIDEO=y
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index 641928d..e9092a3 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/omap3_evm_defconfig b/configs/omap3_evm_defconfig
index 00e052e..1e3965b 100644
--- a/configs/omap3_evm_defconfig
+++ b/configs/omap3_evm_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_EVM=y
diff --git a/configs/omap3_ha_defconfig b/configs/omap3_ha_defconfig
index bf806ce..75aeefb 100644
--- a/configs/omap3_ha_defconfig
+++ b/configs/omap3_ha_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_TAO3530=y
diff --git a/configs/openrd_base_defconfig b/configs/openrd_base_defconfig
index 067ddbc..2abf3ab 100644
--- a/configs/openrd_base_defconfig
+++ b/configs/openrd_base_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_OPENRD=y
 CONFIG_IDENT_STRING="\nOpenRD-Base"
diff --git a/configs/openrd_client_defconfig b/configs/openrd_client_defconfig
index b90ead1..8b3f25f 100644
--- a/configs/openrd_client_defconfig
+++ b/configs/openrd_client_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_OPENRD=y
 CONFIG_IDENT_STRING="\nOpenRD-Client"
diff --git a/configs/openrd_ultimate_defconfig b/configs/openrd_ultimate_defconfig
index 2bc8ace..ba77473 100644
--- a/configs/openrd_ultimate_defconfig
+++ b/configs/openrd_ultimate_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_OPENRD=y
 CONFIG_IDENT_STRING="\nOpenRD-Ultimate"
diff --git a/configs/ot1200_spl_defconfig b/configs/ot1200_spl_defconfig
index 0ddc2fb..1b14de8 100644
--- a/configs/ot1200_spl_defconfig
+++ b/configs/ot1200_spl_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/pcm052_defconfig b/configs/pcm052_defconfig
index fbd7841..4f35a1c 100644
--- a/configs/pcm052_defconfig
+++ b/configs/pcm052_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_PCM052=y
 CONFIG_DEFAULT_DEVICE_TREE="pcm052"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND"
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index b15e25e..0a015a5 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/platinum_picon_defconfig b/configs/platinum_picon_defconfig
index 186c489..b76e837 100644
--- a/configs/platinum_picon_defconfig
+++ b/configs/platinum_picon_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/platinum_titanium_defconfig b/configs/platinum_titanium_defconfig
index d84e02a..3781dcc 100644
--- a/configs/platinum_titanium_defconfig
+++ b/configs/platinum_titanium_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 2e43c41..48c8781 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SPL_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_AT91=y
diff --git a/configs/sniper_defconfig b/configs/sniper_defconfig
index c3f9f37..1ffca40 100644
--- a/configs/sniper_defconfig
+++ b/configs/sniper_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 # CONFIG_SPL_NAND_SUPPORT is not set
diff --git a/configs/tao3530_defconfig b/configs/tao3530_defconfig
index f4171da..1a0e25e 100644
--- a/configs/tao3530_defconfig
+++ b/configs/tao3530_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_TAO3530=y
diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig
index 7156227..b3d9f1f 100644
--- a/configs/taurus_defconfig
+++ b/configs/taurus_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SPL_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_AT91=y
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 95a23d8..9ba1609 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TBS2910=y
 CONFIG_PRE_CONSOLE_BUFFER=y
diff --git a/configs/twister_defconfig b/configs/twister_defconfig
index 826f0f1..c707368 100644
--- a/configs/twister_defconfig
+++ b/configs/twister_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_TWISTER=y
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index a74bd90..e9845a6 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 81a9cc7..89bbb25 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index ccf8250..6e27169 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/x600_defconfig b/configs/x600_defconfig
index 86f6fea..a72c3d4 100644
--- a/configs/x600_defconfig
+++ b/configs/x600_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_TARGET_X600=y
diff --git a/configs/xpress_spl_defconfig b/configs/xpress_spl_defconfig
index be7c87a..1f77d0c 100644
--- a/configs/xpress_spl_defconfig
+++ b/configs/xpress_spl_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/zc5202_defconfig b/configs/zc5202_defconfig
index c1da56c..cb3bfa0 100644
--- a/configs/zc5202_defconfig
+++ b/configs/zc5202_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/configs/zc5601_defconfig b/configs/zc5601_defconfig
index d48fcf1..8dc1266 100644
--- a/configs/zc5601_defconfig
+++ b/configs/zc5601_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 9c899e4..cad0420 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -10,7 +10,6 @@
 #define __CONFIG_H
 
 #include "mx6_common.h"
-#define CONFIG_SYS_THUMB_BUILD
 
 #undef CONFIG_DISPLAY_BOARDINFO
 #define CONFIG_DISPLAY_BOARDINFO_LATE	/* Calls show_board_info() */
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 2fbadf2..b1f6b87 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -10,7 +10,6 @@
 #define __CONFIG_H
 
 #include "mx6_common.h"
-#define CONFIG_SYS_THUMB_BUILD
 
 #undef CONFIG_DISPLAY_BOARDINFO
 #define CONFIG_DISPLAY_BOARDINFO_LATE	/* Calls show_board_info() */
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 3da4211..4da91d3 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -14,8 +14,6 @@
 
 #include "mx7_common.h"
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /*#define CONFIG_DBG_MONITOR*/
 #define PHYS_SDRAM_SIZE			SZ_512M
 
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index bfd5fbd..e01be9d 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -15,7 +15,6 @@
 #include <asm/arch/imx-regs.h>
 
 #define CONFIG_VF610
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SYS_FSL_CLK
 
 #define CONFIG_DISPLAY_BOARDINFO_LATE	/* Calls show_board_info() */
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index b47624a..6793732 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -10,7 +10,6 @@
 #include <config_distro_defaults.h>
 
 #define CONFIG_SYS_DCACHE_OFF
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_SYS_BOOTMAPSZ		(16 << 20)
 
diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h
index c5a035f..9097354 100644
--- a/include/configs/imx6_spl.h
+++ b/include/configs/imx6_spl.h
@@ -24,7 +24,6 @@
  *    and some padding thus 'our' max size is really 0x00908000 - 0x00918000
  *    or 64KB
  */
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SPL_LDSCRIPT	"arch/arm/mach-omap2/u-boot-spl.lds"
 #define CONFIG_SPL_TEXT_BASE		0x00908000
 #define CONFIG_SPL_MAX_SIZE		0x10000
diff --git a/include/configs/kc1.h b/include/configs/kc1.h
index cc78a09..dd18329 100644
--- a/include/configs/kc1.h
+++ b/include/configs/kc1.h
@@ -16,8 +16,6 @@
  * Build
  */
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /*
  * CPU
  */
diff --git a/include/configs/openrd.h b/include/configs/openrd.h
index 14cf3b4..19660db 100644
--- a/include/configs/openrd.h
+++ b/include/configs/openrd.h
@@ -21,7 +21,6 @@
 #define CONFIG_KW88F6281	1	/* SOC Name */
 #define CONFIG_MACH_OPENRD_BASE	/* Machine type */
 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
-#define CONFIG_SYS_THUMB_BUILD
 
 /*
  * Commands configuration
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 4909049..2cbd8fe 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -13,8 +13,6 @@
 
 #define CONFIG_VF610
 
-#define CONFIG_SYS_THUMB_BUILD
-
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
 /* Enable passing of ATAGs */
diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h
index 39c40d3..286b5d6 100644
--- a/include/configs/rcar-gen2-common.h
+++ b/include/configs/rcar-gen2-common.h
@@ -14,8 +14,6 @@
 #define CONFIG_CMD_DFL
 #define CONFIG_CMD_SDRAM
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /* Support File sytems */
 #define CONFIG_FAT_WRITE
 #define CONFIG_SUPPORT_VFAT
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index 318a52c..f07f237 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -17,7 +17,6 @@
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
 #define CONFIG_SYS_CBSIZE		1024
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_SYS_TIMER_RATE		(24 * 1000 * 1000)
 #define CONFIG_SYS_TIMER_BASE		0x200440a0 /* TIMER5 */
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index b5606d4..a08c852 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -17,7 +17,6 @@
 #define CONFIG_BAUDRATE			115200
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
 #define CONFIG_SYS_CBSIZE		1024
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_SYS_TIMER_RATE		(24 * 1000 * 1000)
 #define	CONFIG_SYS_TIMER_BASE		0xff810020 /* TIMER7 */
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index f53f5d8..46ace67 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -270,7 +270,6 @@
 #define CONFIG_SYS_AT91_PLLB		0x10483f0e
 
 #if defined(CONFIG_SPL_BUILD)
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SYS_ICACHE_OFF
 #define CONFIG_SYS_DCACHE_OFF
 #endif
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 582b04a..2f1d817 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -9,8 +9,6 @@
 /* Virtual target or real hardware */
 #undef CONFIG_SOCFPGA_VIRTUAL_TARGET
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /*
  * High level configuration
  */
diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h
index 69135ff..42d46b0 100644
--- a/include/configs/stm32f429-discovery.h
+++ b/include/configs/stm32f429-discovery.h
@@ -8,7 +8,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_STM32F4DISCOVERY
 
 #define CONFIG_MISC_INIT_R
diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h
index ae3211a..734dc00 100644
--- a/include/configs/stm32f746-disco.h
+++ b/include/configs/stm32f746-disco.h
@@ -8,8 +8,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_SYS_THUMB_BUILD
-
 #define CONFIG_SYS_FLASH_BASE		0x08000000
 #define CONFIG_SYS_INIT_SP_ADDR		0x20050000
 #define CONFIG_SYS_TEXT_BASE		0x08000000
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index d48bdac..e5a514f 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -32,13 +32,6 @@
 # define CONFIG_MACH_TYPE_COMPAT_REV	1
 #endif
 
-/*
- * High Level Configuration Options
- */
-#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64)
-#define CONFIG_SYS_THUMB_BUILD	/* Thumbs mode to save space in SPL */
-#endif
-
 /* Serial & console */
 #define CONFIG_SYS_NS16550_SERIAL
 /* ns16550 reg in the low bits of cpu reg */
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index ba7346c..b452ea9 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -23,7 +23,6 @@
 #include <linux/sizes.h>
 
 #if defined(CONFIG_SPL_BUILD)
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SYS_ICACHE_OFF
 #define CONFIG_SYS_DCACHE_OFF
 #endif
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 09a7942..f69df33 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -12,7 +12,6 @@
 #include "mx6_common.h"
 
 /* General configuration */
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_MACH_TYPE		3980
 
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index fbe8859..ca7d6a3 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -278,8 +278,6 @@
 #define CONFIG_CMD_SPL
 #endif
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /* General parts of the framework, required. */
 #define CONFIG_SPL_BOARD_INIT
 
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 8e0f9eb..d07cb9f 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -18,8 +18,6 @@
 #define CONFIG_OMAP4430		1	/* which is in a 4430 */
 #define CONFIG_MISC_INIT_R
 
-#define CONFIG_SYS_THUMB_BUILD
-
 #ifndef CONFIG_SYS_L2CACHE_OFF
 #define CONFIG_SYS_L2_PL310		1
 #define CONFIG_SYS_PL310_BASE	0x48242000
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index e4b3290..5735001 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -17,7 +17,6 @@
 #define __CONFIG_H
 
 /* High Level Configuration Options */
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_OMAP			/* in a TI OMAP core */
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
diff --git a/include/configs/x600.h b/include/configs/x600.h
index 67c70f6..082ce1f 100644
--- a/include/configs/x600.h
+++ b/include/configs/x600.h
@@ -16,7 +16,6 @@
  */
 #define CONFIG_SPEAR600				/* SPEAr600 SoC */
 #define CONFIG_X600				/* on X600 board */
-#define CONFIG_SYS_THUMB_BUILD
 
 #include <asm/arch/hardware.h>
 
-- 
2.1.4



More information about the U-Boot mailing list