From 4fdf9763d25f70fd1e3591f6ff9785f78dd6170d Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 26 Aug 2013 17:32:49 -0700 Subject: [PATCH] exynos5420: flush caches and disable MMU in resume path This patch flushes the caches and disables the MMU before resuming. c32b9b3 ("Set up caching in the bootblock.") had a bug where the dcache and MMU remained enabled in the resume path. This caused the machine to hang on resume. However, other bugs were preventing us from testing this properly earlier on so it went unnoticed until now. Signed-off-by: David Hendricks BUG=none BRANCH=none TEST=Built and booted on pit, powerd_dbus_suspend works again, "suspend_stress_test --memory_check" ran 10 times without problems. Change-Id: Ib1774f09d286a4d659da9fc2dad1d7a6fc1ebe5e Reviewed-on: https://chromium-review.googlesource.com/67007 Reviewed-by: ron minnich Commit-Queue: David Hendricks Tested-by: David Hendricks --- src/cpu/samsung/exynos5420/wakeup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu/samsung/exynos5420/wakeup.c b/src/cpu/samsung/exynos5420/wakeup.c index 5764c83bd6..af7ef73f89 100644 --- a/src/cpu/samsung/exynos5420/wakeup.c +++ b/src/cpu/samsung/exynos5420/wakeup.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include "power.h" #include "wakeup.h" @@ -27,6 +28,8 @@ void wakeup(void) power_reset(); power_init(); /* Ensure ps_hold_setup() for early wakeup. */ + dcache_mmu_disable(); + icache_invalidate_all(); power_exit_wakeup(); /* Should never return. */ die("Failed to wake up.\n");