[U-Boot,2/2] xtensa: clean up CONFIG_SYS_TEXT_ADDR

Message ID 1518478759-11609-3-git-send-email-jcmvbkbc@gmail.com
State Accepted
Commit 10117a298554d586e7a288a9fa0b574ce35d62a0
Delegated to: Tom Rini
Headers show
Series
  • xtensa: clean up SYS_MONITOR_LEN/SYS_TEXT_ADDR
Related show

Commit Message

Max Filippov Feb. 12, 2018, 11:39 p.m.
Drop CONFIG_SYS_MEMORY_TOP. Rename CONFIG_SYS_TEXT_ADDR to
XTENSA_SYS_TEXT_ADDR.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 arch/xtensa/cpu/start.S    | 2 +-
 arch/xtensa/cpu/u-boot.lds | 4 ++--
 include/configs/xtfpga.h   | 5 ++---
 3 files changed, 5 insertions(+), 6 deletions(-)

Comments

Tom Rini Feb. 23, 2018, 6:03 p.m. | #1
On Mon, Feb 12, 2018 at 03:39:19PM -0800, Max Filippov wrote:

> Drop CONFIG_SYS_MEMORY_TOP. Rename CONFIG_SYS_TEXT_ADDR to
> XTENSA_SYS_TEXT_ADDR.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

Applied to u-boot/master, thanks!

Patch

diff --git a/arch/xtensa/cpu/start.S b/arch/xtensa/cpu/start.S
index 8e4bc99e4295..cdb875da5339 100644
--- a/arch/xtensa/cpu/start.S
+++ b/arch/xtensa/cpu/start.S
@@ -226,7 +226,7 @@  _start:
 #endif
 
 	movi	a0, 0
-	movi	sp, (CONFIG_SYS_TEXT_ADDR - 16) & 0xfffffff0
+	movi	sp, (XTENSA_SYS_TEXT_ADDR - 16) & 0xfffffff0
 
 #ifdef CONFIG_DEBUG_UART
 	movi	a4, debug_uart_init
diff --git a/arch/xtensa/cpu/u-boot.lds b/arch/xtensa/cpu/u-boot.lds
index 853ae5a94891..7200bc59fbfc 100644
--- a/arch/xtensa/cpu/u-boot.lds
+++ b/arch/xtensa/cpu/u-boot.lds
@@ -74,9 +74,9 @@  SECTIONS
   SECTION_VECTOR(DoubleExceptionVector,text,XCHAL_DOUBLEEXC_VECTOR_VADDR,
 		 FOLLOWING(.DoubleExceptionVector.literal))
 
-  __monitor_start = CONFIG_SYS_TEXT_ADDR;
+  __monitor_start = XTENSA_SYS_TEXT_ADDR;
 
-  SECTION_text(CONFIG_SYS_TEXT_ADDR, FOLLOWING(.DoubleExceptionVector.text))
+  SECTION_text(XTENSA_SYS_TEXT_ADDR, FOLLOWING(.DoubleExceptionVector.text))
   SECTION_rodata(ALIGN(16), FOLLOWING(.text))
   SECTION_u_boot_list(ALIGN(16), FOLLOWING(.rodata))
   SECTION_data(ALIGN(16), FOLLOWING(.u_boot_list))
diff --git a/include/configs/xtfpga.h b/include/configs/xtfpga.h
index 86c7e7cf279c..d0b3b34571d2 100644
--- a/include/configs/xtfpga.h
+++ b/include/configs/xtfpga.h
@@ -91,9 +91,8 @@ 
 #define CONFIG_SYS_MEMORY_SIZE		CONFIG_SYS_SDRAM_SIZE
 #endif
 
-#define CONFIG_SYS_MEMORY_TOP		MEMADDR(CONFIG_SYS_MEMORY_SIZE)
-#define CONFIG_SYS_TEXT_ADDR		\
-	(CONFIG_SYS_MEMORY_TOP - CONFIG_SYS_MONITOR_LEN)
+#define XTENSA_SYS_TEXT_ADDR		\
+	(MEMADDR(CONFIG_SYS_MEMORY_SIZE) - CONFIG_SYS_MONITOR_LEN)
 
 /* Used by tftpboot; env var 'loadaddr' */
 #define CONFIG_SYS_LOAD_ADDR		MEMADDR(0x02000000)