Patchwork [U-Boot,RFC,11/14] x86: remove gd->start_addr_sp

login
register
mail settings
Submitter Graeme Russ
Date Dec. 23, 2011, 12:25 p.m.
Message ID <1324643151-23642-12-git-send-email-graeme.russ@gmail.com>
Download mbox | patch
Permalink /patch/133028/
State Superseded
Delegated to: Graeme Russ
Headers show

Comments

Graeme Russ - Dec. 23, 2011, 12:25 p.m.
It's not used for anything useful
---
 arch/x86/include/asm/global_data.h |    1 -
 arch/x86/lib/board.c               |    4 +---
 2 files changed, 1 insertions(+), 4 deletions(-)

Patch

diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 05a2139..ad15509 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -50,7 +50,6 @@  typedef	struct global_data {
 	unsigned long	cpu_clk;	/* CPU clock in Hz!		*/
 	unsigned long	bus_clk;
 	unsigned long	relocaddr;	/* Start address of U-Boot in RAM */
-	unsigned long	start_addr_sp;	/* start_addr_stackpointer */
 	phys_size_t	ram_size;	/* RAM size */
 	unsigned long	reset_status;	/* reset status register at boot */
 	void		**jt;		/* jump table */
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index f201542..e8274bf 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -163,7 +163,7 @@  static int calculate_relocation_address(gd_t *id)
 	ulong rel_offset;
 
 	/* Calculate destination RAM Address and relocation offset */
-	dest_addr = id->start_addr_sp;
+	dest_addr = (ulong)id;
 	dest_addr -= CONFIG_SYS_STACK_SIZE;
 	dest_addr -= (bss_end - text_start);
 
@@ -265,8 +265,6 @@  void relocate_code(ulong stack_ptr, gd_t *id, ulong reloc_addr)
 	/* gd is still in CAR - Copy it into SDRAM */
 	memcpy(id, gd, sizeof(gd_t));
 
-	id->start_addr_sp = stack_ptr;
-
 	if (init_cache() != 0)
 		hang();