summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/lib/cache.c')
-rw-r--r--arch/powerpc/lib/cache.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c
index c4c5c2d4513..e4d9546039d 100644
--- a/arch/powerpc/lib/cache.c
+++ b/arch/powerpc/lib/cache.c
@@ -4,10 +4,11 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
-#include <common.h>
#include <cpu_func.h>
+#include <stdio.h>
#include <asm/cache.h>
#include <watchdog.h>
+#include <linux/errno.h>
static ulong maybe_watchdog_reset(ulong flushed)
{
@@ -44,3 +45,22 @@ void flush_cache(ulong start_addr, ulong size)
/* flush prefetch queue */
asm volatile("isync" : : : "memory");
}
+
+/*
+ * Default implementation:
+ * do a range flush for the entire range
+ */
+void flush_dcache_all(void)
+{
+ flush_dcache_range(0, ~0);
+}
+
+void invalidate_icache_all(void)
+{
+ puts("No arch specific invalidate_icache_all available!\n");
+}
+
+int __weak pgprot_set_attrs(phys_addr_t addr, size_t size, enum pgprot_attrs perm)
+{
+ return -ENOSYS;
+}