msm: restart: flush the cache before restart
Currently during panic case, the ramdump does not have the last part
of dmesg because of cache not getting flushed. Hence flush the cache
during restart.
Change-Id: I2e6971e8f67a29a950e8c3a68fbf340a4c222ee8
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
diff --git a/arch/arm/mach-msm/restart.c b/arch/arm/mach-msm/restart.c
index 25723d5..53736ac 100644
--- a/arch/arm/mach-msm/restart.c
+++ b/arch/arm/mach-msm/restart.c
@@ -26,6 +26,7 @@
#include <linux/mfd/pm8xxx/misc.h>
#include <asm/mach-types.h>
+#include <asm/cacheflush.h>
#include <mach/msm_iomap.h>
#include <mach/restart.h>
@@ -221,6 +222,8 @@
__raw_writel(0x77665501, restart_reason);
}
}
+
+ flush_cache_all();
}
void msm_restart(char mode, const char *cmd)