summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2015-01-18 22:18:38 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2015-01-21 14:07:16 +0100
commitdd82128ef5e9fc660862a0a60423aa01a03de5d4 (patch)
treef62fed5cc38da9680d9532403ab0ab203dc0b777 /arch/mips
parent9d638eeab71c506cdb7b085fa1932dad13885c02 (diff)
downloadu-boot-imx-dd82128ef5e9fc660862a0a60423aa01a03de5d4.zip
u-boot-imx-dd82128ef5e9fc660862a0a60423aa01a03de5d4.tar.gz
u-boot-imx-dd82128ef5e9fc660862a0a60423aa01a03de5d4.tar.bz2
MIPS: add support for CONFIG_SYS_INIT_SP_ADDR
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>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/cpu/mips32/start.S7
-rw-r--r--arch/mips/cpu/mips64/start.S7
2 files changed, 12 insertions, 2 deletions
diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S
index 384ea26..5946859 100644
--- a/arch/mips/cpu/mips32/start.S
+++ b/arch/mips/cpu/mips32/start.S
@@ -15,6 +15,11 @@
#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
diff --git a/arch/mips/cpu/mips64/start.S b/arch/mips/cpu/mips64/start.S
index 6ff714e..81df923 100644
--- a/arch/mips/cpu/mips64/start.S
+++ b/arch/mips/cpu/mips64/start.S
@@ -15,6 +15,11 @@
#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