diff options
| author | Weijie Gao <weijie.gao@mediatek.com> | 2020-04-21 09:28:27 +0200 |
|---|---|---|
| committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2020-04-27 20:29:33 +0200 |
| commit | 2434f58c784e3216b7925fe00ce49c113c6a511e (patch) | |
| tree | 10775361e669e3fb4dbd4e3a503898e7eca7cc4d /arch/mips/cpu | |
| parent | aba6e77a30e4f190e70c400867b74962ef88ce0e (diff) | |
mips: add an option to support initialize SRAM for initial stack
Currently CONFIG_MIPS_INIT_STACK_IN_SRAM assumes the memory space for the
initial stack can be used directly. However on some platform the SRAM needs
initialization, e.g. lock cache.
This patch adds an option to allow a new function mips_sram_init() being
called before setup_stack_gd.
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Diffstat (limited to 'arch/mips/cpu')
| -rw-r--r-- | arch/mips/cpu/start.S | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S index 784b8be8146..dd93df9e4a1 100644 --- a/arch/mips/cpu/start.S +++ b/arch/mips/cpu/start.S @@ -217,6 +217,13 @@ wr_done: #endif #ifdef CONFIG_MIPS_INIT_STACK_IN_SRAM +#ifdef CONFIG_MIPS_SRAM_INIT + /* Initialize the SRAM first */ + PTR_LA t9, mips_sram_init + jalr t9 + nop +#endif + /* Set up initial stack and global data */ setup_stack_gd |
