From ea58440a8d25fb3be58af9a2fc7c31675d94843e Mon Sep 17 00:00:00 2001 From: Aaron Wu Date: Wed, 22 Oct 2014 13:45:58 +0800 Subject: [PATCH] pm: sometimes wake up from suspend to RAM would fail Sometimes it fails to wake up from suspend to RAM, this is because we would flush the data cache by assemble command FLUSHINV before suspend to RAM, and there is a delay between this command execution and cache flush completion. Add a 1uS delay to works around this. Signed-off-by: Aaron Wu --- arch/blackfin/mach-common/pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index 1387a94bcfd5a..a66d979ec6512 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -180,6 +181,7 @@ int bfin_pm_suspend_mem_enter(void) #if defined(CONFIG_BFIN_EXTMEM_WRITEBACK) || defined(CONFIG_BFIN_L2_WRITEBACK) flushinv_all_dcache(); + udelay(1); #endif _disable_dcplb(); _disable_icplb(); -- 2.39.5