Skip to content
Snippets Groups Projects
Commit ab2a98b1 authored by Daniel Schwierzeck's avatar Daniel Schwierzeck Committed by Shinya Kuribayashi
Browse files

MIPS: make cache operation mode configurable


Currently the cache operation mode is hard-coded to
CONF_CM_CACHABLE_NONCOHERENT. This is not appropiate for CPUs or SOCs
which operate at a different mode.

This patch makes the cache operation mode configurable via board config.

Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Acked-by: default avatarThomas Langer <thomas.langer@lantiq.com>
Signed-off-by: default avatarShinya Kuribayashi <skuribay@pobox.com>
parent 7185adb4
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
#include <asm/regdef.h> #include <asm/regdef.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#ifndef CONFIG_SYS_MIPS_CACHE_MODE
#define CONFIG_SYS_MIPS_CACHE_MODE CONF_CM_CACHABLE_NONCOHERENT
#endif
/* /*
* For the moment disable interrupts, mark the kernel mode and * For the moment disable interrupts, mark the kernel mode and
* set ST0_KX so that the CPU does not spit fire when using * set ST0_KX so that the CPU does not spit fire when using
...@@ -249,7 +253,7 @@ reset: ...@@ -249,7 +253,7 @@ reset:
nop nop
/* ... and enable them */ /* ... and enable them */
li t0, CONF_CM_CACHABLE_NONCOHERENT li t0, CONFIG_SYS_MIPS_CACHE_MODE
mtc0 t0, CP0_CONFIG mtc0 t0, CP0_CONFIG
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment