S3C6400/SMDK6400: fix stack_setup in start.S
authorSeunghyeon Rhee <rhee4j1@gmail.com>
Fri, 13 Nov 2009 07:49:41 +0000 (16:49 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 13 Nov 2009 08:49:26 +0000 (17:49 +0900)
Fix stack_setup to place the stack on the correct address in DRAM
accroding to U-Boot standard and remove conditional compilation by
CONFIG_MEMORY_UPPER_CODE macro that is not necessry. This macro
was introduced and used only by this board for some unclear reason.

The definition of this macro is also removed because it's not
referenced elsewhere.

Signed-off-by: Seunghyeon Rhee <seunghyeon@lpmtec.com>
Tested-by: Minkyu Kang <mk7.kang@samsung.com>
cpu/arm1176/start.S
include/configs/smdk6400.h

index 2bb9bf2..68a356d 100644 (file)
@@ -241,16 +241,11 @@ mmu_enable:
 skip_hw_init:
        /* Set up the stack                                                 */
 stack_setup:
-#ifdef CONFIG_MEMORY_UPPER_CODE
-       ldr     sp, =(CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE - 0xc)
-#else
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
+       ldr     r0, =CONFIG_SYS_UBOOT_BASE      /* base of copy in DRAM     */
        sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
        sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
        sub     sp, r0, #12             /* leave 3 words for abort-stack    */
 
-#endif
-
 clear_bss:
        ldr     r0, _bss_start          /* find start of bss segment        */
        ldr     r1, _bss_end            /* stop here                        */
index f6e1221..f644cd2 100644 (file)
@@ -49,8 +49,6 @@
 #define CONFIG_ENABLE_MMU
 #endif
 
-#define CONFIG_MEMORY_UPPER_CODE
-
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_INITRD_TAG