summaryrefslogtreecommitdiff
path: root/arch/mips/lib/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lib/cache.c')
-rw-r--r--arch/mips/lib/cache.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/lib/cache.c b/arch/mips/lib/cache.c
index 1d14fc487e..d56fd1e0f4 100644
--- a/arch/mips/lib/cache.c
+++ b/arch/mips/lib/cache.c
@@ -175,3 +175,23 @@ void invalidate_dcache_range(ulong start_addr, ulong stop)
/* ensure cache ops complete before any further memory accesses */
sync();
}
+
+int dcache_status(void)
+{
+ unsigned int cca = read_c0_config() & CONF_CM_CMASK;
+ return cca != CONF_CM_UNCACHED;
+}
+
+void dcache_enable(void)
+{
+ puts("Not supported!\n");
+}
+
+void dcache_disable(void)
+{
+ /* change CCA to uncached */
+ change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
+
+ /* ensure the pipeline doesn't contain now-invalid instructions */
+ instruction_hazard_barrier();
+}