ARM: EXYNOS: Move scu_enable in the cpu_pm notifier
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 8 May 2014 21:50:16 +0000 (06:50 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Sun, 25 May 2014 20:21:07 +0000 (05:21 +0900)
We make the cpuidle code less arch dependent.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/cpuidle.c
arch/arm/mach-exynos/pm.c

index 7a2d01b..bf1bf87 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/platform_device.h>
 
 #include <asm/proc-fns.h>
-#include <asm/smp_scu.h>
 #include <asm/suspend.h>
 #include <asm/unified.h>
 #include <asm/cpuidle.h>
@@ -75,11 +74,6 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
 
        cpu_pm_enter();
        cpu_suspend(0, idle_finisher);
-
-#ifdef CONFIG_SMP
-       if (!soc_is_exynos5250())
-               scu_enable(S5P_VA_SCU);
-#endif
        cpu_pm_exit();
 
        /*
index 3eb80cd..fb1d916 100644 (file)
@@ -400,8 +400,13 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
                break;
 
        case CPU_PM_EXIT:
-               if (cpu == 0)
+               if (cpu == 0) {
+#ifdef CONFIG_SMP
+                       if (!soc_is_exynos5250())
+                               scu_enable(S5P_VA_SCU);
+#endif
                        exynos_cpu_restore_register();
+               }
                break;
        }