pm: sometimes wake up from suspend to RAM would fail
authorAaron Wu <Aaron.wu@analog.com>
Wed, 22 Oct 2014 05:45:58 +0000 (13:45 +0800)
committerSteven Miao <realmz6@gmail.com>
Thu, 23 Apr 2015 13:34:32 +0000 (21:34 +0800)
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 <Aaron.wu@analog.com>
arch/blackfin/mach-common/pm.c

index 1387a94bcfd5a30e68fb00d9e293eea7db710d98..a66d979ec6512b24857f98227e01412a3ea83a75 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/delay.h>
 
 #include <asm/cplb.h>
 #include <asm/gpio.h>
@@ -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();