summaryrefslogtreecommitdiffstats
path: root/arch/mips/boot/main_entry.c
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2012-05-22 16:17:00 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-05-23 18:47:53 +0200
commite41b0717dc6594e8cf063b7023fde814f2ac97b4 (patch)
treeb226ae682ed82ed9ca14d48b51a5d91c74730e0a /arch/mips/boot/main_entry.c
parent6a1e9a7c9b384d80c6977f2a1d5682a4e9e39de1 (diff)
downloadbarebox-e41b0717dc6594e8cf063b7023fde814f2ac97b4.tar.gz
barebox-e41b0717dc6594e8cf063b7023fde814f2ac97b4.tar.xz
MIPS: import CPU and cache detection code from Linux 3.4
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/boot/main_entry.c')
-rw-r--r--arch/mips/boot/main_entry.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c
index 76fa492ca9..8f5f6fc00e 100644
--- a/arch/mips/boot/main_entry.c
+++ b/arch/mips/boot/main_entry.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <string.h>
#include <asm/sections.h>
+#include <asm/cpu-features.h>
extern void start_barebox(void);
@@ -39,5 +40,13 @@ void main_entry(void)
/* clear the BSS first */
memset(__bss_start, 0x00, __bss_stop - __bss_start);
+ cpu_probe();
+
+ if (cpu_has_4k_cache) {
+ extern void r4k_cache_init(void);
+
+ r4k_cache_init();
+ }
+
start_barebox();
}