@@ -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 */
@@ -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();