summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2020-08-24 13:04:41 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2020-10-07 20:25:57 +0200
commit399b867fac244c4506f0a9365e7d53bfe74e66b4 (patch)
tree5c7daceb9db57f5d6385535998b41f80dae2795b /arch/mips
parentb28d35234cc2cbb68fb1bd0aa0a40323834ee454 (diff)
downloadu-boot-399b867fac244c4506f0a9365e7d53bfe74e66b4.tar.gz
mips: octeon: cache.c: Flush all pending writes in flush_dcache_range()
As noticed while working on the USB xHCI support, Octeon needs to flush all pending writes so that the values are present in the memory. Add this "syncw" instruction (twice) to flush_dcache_range(). Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/mach-octeon/cache.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/mach-octeon/cache.c b/arch/mips/mach-octeon/cache.c
index 9a88bb97c7..f293d65dae 100644
--- a/arch/mips/mach-octeon/cache.c
+++ b/arch/mips/mach-octeon/cache.c
@@ -5,14 +5,13 @@
#include <cpu_func.h>
-/*
- * The Octeon platform is cache coherent and cache flushes and invalidates
- * are not needed. Define some platform specific empty flush_foo()
- * functions here to overwrite the _weak common function as a no-op.
- * This effectively disables all cache operations.
- */
+/* Octeon memory write barrier */
+#define CVMX_SYNCW asm volatile ("syncw\nsyncw\n" : : : "memory")
+
void flush_dcache_range(ulong start_addr, ulong stop)
{
+ /* Flush all pending writes */
+ CVMX_SYNCW;
}
void flush_cache(ulong start_addr, ulong size)
@@ -21,4 +20,5 @@ void flush_cache(ulong start_addr, ulong size)
void invalidate_dcache_range(ulong start_addr, ulong stop)
{
+ /* Don't need to do anything for OCTEON */
}