]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
MIPS: add support for CONFIG_SYS_INIT_SP_ADDR
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sun, 18 Jan 2015 21:18:38 +0000 (22:18 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 21 Jan 2015 13:07:16 +0000 (14:07 +0100)
Support the existing config option CONFIG_SYS_INIT_SP_ADDR on
MIPS. This allows to move the initial stack to other places
than the beginning of RAM.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
arch/mips/cpu/mips32/start.S
arch/mips/cpu/mips64/start.S

index 384ea26022bcf5b907a8eaf541466bbb56a3612a..59468590a98b39f03ab34edc880248fc1934530e 100644 (file)
 #define CONFIG_SYS_MIPS_CACHE_MODE CONF_CM_CACHABLE_NONCOHERENT
 #endif
 
+#ifndef CONFIG_SYS_INIT_SP_ADDR
+#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_SDRAM_BASE + \
+                               CONFIG_SYS_INIT_SP_OFFSET)
+#endif
+
        /*
         * For the moment disable interrupts, mark the kernel mode and
         * set ST0_KX so that the CPU does not spit fire when using
@@ -135,7 +140,7 @@ reset:
 #endif
 
        /* Set up temporary stack */
-       li      sp, CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_INIT_SP_OFFSET
+       li      sp, CONFIG_SYS_INIT_SP_ADDR
        move    fp, sp
 
        la      t9, board_init_f
index 6ff714e8ed4fa2f177ecdc02d9fa8989dd1fe783..81df923bc349831f58d885e240dae5374ee97e0e 100644 (file)
 #define CONFIG_SYS_MIPS_CACHE_MODE CONF_CM_CACHABLE_NONCOHERENT
 #endif
 
+#ifndef CONFIG_SYS_INIT_SP_ADDR
+#define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_SDRAM_BASE + \
+                               CONFIG_SYS_INIT_SP_OFFSET)
+#endif
+
 #ifdef CONFIG_SYS_LITTLE_ENDIAN
 #define MIPS64_R_INFO(ssym, r_type3, r_type2, r_type) \
        (((r_type) << 24) | ((r_type2) << 16) | ((r_type3) << 8) | (ssym))
@@ -129,7 +134,7 @@ reset:
 #endif
 
        /* Set up temporary stack */
-       dli     sp, CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_INIT_SP_OFFSET
+       dli     sp, CONFIG_SYS_INIT_SP_ADDR
        move    fp, sp
 
        dla     t9, board_init_f