summaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2016-03-07 16:30:16 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-09 19:58:50 +0100
commite3fbe5e85d24a63f8c46d486b60ebb15cfcad541 (patch)
treea3fd0a4f40e0aafa6138cda5aeb3d489467b3c28 /arch/mips/include
parent6d352cacb8dca98a9afefc42d4e0fec7e8aa2509 (diff)
downloadbarebox-e3fbe5e85d24a63f8c46d486b60ebb15cfcad541.tar.gz
barebox-e3fbe5e85d24a63f8c46d486b60ebb15cfcad541.tar.xz
MIPS: add initial R4000-style cache support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/cacheops.h7
-rw-r--r--arch/mips/include/asm/io.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h
index 5bd44d5fd4..3bc585259f 100644
--- a/arch/mips/include/asm/cacheops.h
+++ b/arch/mips/include/asm/cacheops.h
@@ -18,12 +18,19 @@
#define Cache_I 0x00
#define Cache_D 0x01
+#define Index_Writeback_Inv 0x00
#define Index_Store_Tag 0x08
+#define Hit_Invalidate 0x10
+#define Hit_Writeback_Inv 0x14 /* not with Cache_I though */
/*
* Cache Operations available on all MIPS processors with R4000-style caches
*/
+#define Index_Invalidate_I (Cache_I | Index_Writeback_Inv)
+#define Index_Writeback_Inv_D (Cache_D | Index_Writeback_Inv)
#define Index_Store_Tag_I (Cache_I | Index_Store_Tag)
#define Index_Store_Tag_D (Cache_D | Index_Store_Tag)
+#define Hit_Invalidate_D (Cache_D | Hit_Invalidate)
+#define Hit_Writeback_Inv_D (Cache_D | Hit_Writeback_Inv)
#endif /* __ASM_CACHEOPS_H */
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index 4832be6d09..4bee5913a5 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -14,6 +14,9 @@
#include <asm/types.h>
#include <asm/byteorder.h>
+void dma_flush_range(unsigned long, unsigned long);
+void dma_inv_range(unsigned long, unsigned long);
+
#define IO_SPACE_LIMIT 0
/*****************************************************************************/