Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[powerpc.git] / arch / arm / mach-s3c2410 / pm.c
index 13a48ee..43e9a55 100644 (file)
@@ -58,7 +58,11 @@ unsigned long s3c_pm_flags;
 
 /* cache functions from arch/arm/mm/proc-arm920.S */
 
+#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
 extern void arm920_flush_kern_cache_all(void);
+#else
+static void arm920_flush_kern_cache_all(void) { }
+#endif
 
 #define PFX "s3c24xx-pm: "
 
@@ -585,14 +589,16 @@ static int s3c2410_pm_enter(suspend_state_t state)
 
        s3c2410_pm_check_store();
 
-       // need to make some form of time-delta
-
        /* send the cpu to sleep... */
 
        __raw_writel(0x00, S3C2410_CLKCON);  /* turn off clocks over sleep */
 
        s3c2410_cpu_suspend(regs_save);
 
+       /* restore the cpu state */
+
+       cpu_init();
+
        /* unset the return-from-sleep flag, to ensure reset */
 
        tmp = __raw_readl(S3C2410_GSTATUS2);