summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/shutdown.c
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2016-03-07 16:30:17 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-09 19:58:50 +0100
commit0076383a13f5abe354bed1a6606b8e073944202c (patch)
treee4b1193918e2c1c780aaa95341d1619c2eb20017 /arch/mips/lib/shutdown.c
parente3fbe5e85d24a63f8c46d486b60ebb15cfcad541 (diff)
downloadbarebox-0076383a13f5abe354bed1a6606b8e073944202c.tar.gz
barebox-0076383a13f5abe354bed1a6606b8e073944202c.tar.xz
MIPS: flush cache on shutdown
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/lib/shutdown.c')
-rw-r--r--arch/mips/lib/shutdown.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/lib/shutdown.c b/arch/mips/lib/shutdown.c
new file mode 100644
index 0000000000..973cd23c71
--- /dev/null
+++ b/arch/mips/lib/shutdown.c
@@ -0,0 +1,12 @@
+/**
+ * This function is called by shutdown_barebox to get a clean
+ * memory/cache state.
+ */
+#include <init.h>
+#include <asm/cache.h>
+
+static void arch_shutdown(void)
+{
+ flush_cache_all();
+}
+archshutdown_exitcall(arch_shutdown);