diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index fa486e9e4d..9ce7c656b1 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -86,7 +86,7 @@ ENTRY(_main) bl board_init_f_mem mov sp, r0 -#ifdef CONFIG_ARCH_IPQ807x +#if defined(CONFIG_ARCH_IPQ807x) || defined(CONFIG_ARCH_IPQ40xx) ldr r0, =__bss_start /* this is auto-relocated! */ #ifdef CONFIG_USE_ARCH_MEMSET @@ -156,7 +156,7 @@ here: cmp r0, #0 movne sp, r0 # endif -#ifndef CONFIG_ARCH_IPQ807x +#if !defined(CONFIG_ARCH_IPQ807x) && !defined(CONFIG_ARCH_IPQ40xx) ldr r0, =__bss_start /* this is auto-relocated! */ #ifdef CONFIG_USE_ARCH_MEMSET diff --git a/common/board_f.c b/common/board_f.c index 7e4352e3a7..fae2593d95 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1061,7 +1061,7 @@ void board_init_f(ulong boot_flags) gd->flags = boot_flags; gd->have_console = 0; -#ifdef CONFIG_ARCH_IPQ807x +#if defined(CONFIG_ARCH_IPQ807x) || defined(CONFIG_ARCH_IPQ40xx) gd->flags |= GD_FLG_SKIP_RELOC; #endif diff --git a/include/configs/ipq40xx.h b/include/configs/ipq40xx.h index fd5fe99d53..c3f5255807 100644 --- a/include/configs/ipq40xx.h +++ b/include/configs/ipq40xx.h @@ -46,7 +46,10 @@ #define CONFIG_SYS_SDRAM_BASE 0x80000000 #define CONFIG_SYS_TEXT_BASE 0x87300000 #define CONFIG_SYS_SDRAM_SIZE 0x10000000 -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x100000 - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE -\ + CONFIG_SYS_MALLOC_LEN -\ + CONFIG_ENV_SIZE -\ + GENERATED_BD_INFO_SIZE) #define CONFIG_MAX_RAM_BANK_SIZE CONFIG_SYS_SDRAM_SIZE #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + (64 << 20)) #define CONFIG_DTB_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + (96 << 20))