diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2019-10-21 13:50:20 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-23 09:05:54 +0200 |
commit | 9305f5c09159d8488014a8619f0af4ffdfb71003 (patch) | |
tree | 06deaa413bbd8e5fd9e94285717a69bd9ccba2dc /arch | |
parent | 0ca2c61a2b99ea56b1e9a44ae3df1483245d299e (diff) | |
download | barebox-9305f5c09159d8488014a8619f0af4ffdfb71003.tar.gz barebox-9305f5c09159d8488014a8619f0af4ffdfb71003.tar.xz |
MIPS: move r4k_cache_init in to cpu_probe function
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/boot/main_entry.c | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/cache.h | 1 | ||||
-rw-r--r-- | arch/mips/lib/cpu-probe.c | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c index 4ae4457e7e..2c18bc81c3 100644 --- a/arch/mips/boot/main_entry.c +++ b/arch/mips/boot/main_entry.c @@ -77,12 +77,6 @@ void __bare_init main_entry(void *fdt, u32 fdt_size) cpu_probe(); - if (cpu_has_4k_cache) { - extern void r4k_cache_init(void); - - r4k_cache_init(); - } - trap_init(); malloc_end = (unsigned long)_stext; diff --git a/arch/mips/include/asm/cache.h b/arch/mips/include/asm/cache.h index cceba0acc0..4bb39b1cd4 100644 --- a/arch/mips/include/asm/cache.h +++ b/arch/mips/include/asm/cache.h @@ -2,5 +2,6 @@ #define _ASM_MIPS_CACHE_H void flush_cache_all(void); +void r4k_cache_init(void); #endif /* _ASM_MIPS_CACHE_H */ diff --git a/arch/mips/lib/cpu-probe.c b/arch/mips/lib/cpu-probe.c index 2556a8b240..ddabddd466 100644 --- a/arch/mips/lib/cpu-probe.c +++ b/arch/mips/lib/cpu-probe.c @@ -9,6 +9,8 @@ */ #include <common.h> #include <asm/mipsregs.h> +#include <asm/cache.h> +#include <asm/cpu-features.h> #include <asm/cpu-info.h> #include <asm/cpu.h> #include <memory.h> @@ -163,6 +165,9 @@ void cpu_probe(void) cpu_probe_ingenic(c); break; } + + if (cpu_has_4k_cache) + r4k_cache_init(); } unsigned long mips_stack_top; |