diff mbox

[03/13] spl: Kconfig: Add CONFIG_SPL_TEXT_BASE as Kconfig option

Message ID 20160818154146.16788-4-afd@ti.com
State New
Headers show

Commit Message

Andrew Davis Aug. 18, 2016, 3:41 p.m. UTC
Add a new Kconfig CONFIG_SPL_TEXT_BASE. Add its use to
am335x_evm_defconfig, then only conditionally define it in
ti_am335x_common.h when it is not already defined, this allows for
systems that have not fully converted to the Kconfig based config
system to still include this header without redefining this symbol
on platforms that have.

Signed-off-by: Andrew F. Davis <afd@ti.com>

---
 Kconfig                            | 8 ++++++++
 configs/am335x_evm_defconfig       | 1 +
 include/configs/ti_am335x_common.h | 2 ++
 3 files changed, 11 insertions(+)

-- 
2.9.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/Kconfig b/Kconfig
index cb5af5b..f67e7c8 100644
--- a/Kconfig
+++ b/Kconfig
@@ -319,6 +319,14 @@  config SYS_TEXT_BASE
 	help
 	  TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
 
+config SPL_TEXT_BASE
+	hex "Text Base"
+	depends on SPL
+	help
+	  When SPL is enabled the image is linked with this as the
+	  starting address in memeory for which the SPL will be loaded.
+	  TODO: Move CONFIG_SPL_TEXT_BASE for all the architecture
+
 config SPL_LOAD_FIT
 	bool "Enable SPL loading U-Boot as a FIT"
 	depends on FIT
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 6885230..b1264d7 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -3,6 +3,7 @@  CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
 CONFIG_SPL=y
+CONFIG_SPL_TEXT_BASE=0x402F0400
 CONFIG_SPL_STACK_R=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_HUSH_PARSER=y
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index bcd56fc..25c9643 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -58,7 +58,9 @@ 
  * supports X-MODEM loading via UART, and we leverage this and then use
  * Y-MODEM to load u-boot.img, when booted over UART.
  */
+#ifndef CONFIG_SPL_TEXT_BASE
 #define CONFIG_SPL_TEXT_BASE		0x402F0400
+#endif
 #define CONFIG_SPL_MAX_SIZE		(0x4030B800 - CONFIG_SPL_TEXT_BASE)
 #define CONFIG_SYS_SPL_ARGS_ADDR	(CONFIG_SYS_SDRAM_BASE + \
 					 (128 << 20))