diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-05-09 06:43:27 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-05-26 05:21:07 +0900 |
commit | 20115fa874ce948f309b49d7b641d2cf55e09ad4 (patch) | |
tree | c53c2bcf9e6e69fa67e25e9bfeb416bc4cd0d335 /arch/arm/mach-exynos | |
parent | 309e08c4ca5446ab9f3e8c17581e5515855d339d (diff) | |
download | linux-20115fa874ce948f309b49d7b641d2cf55e09ad4.tar.gz linux-20115fa874ce948f309b49d7b641d2cf55e09ad4.tar.bz2 linux-20115fa874ce948f309b49d7b641d2cf55e09ad4.zip |
ARM: EXYNOS: Move some code inside the idle_finisher for cpuidle
Move the code around to differentiate different section of code and
prepare it to be factored out in the next patches.
The call order changed but hat doesn't have a side effect because
they are independent. The important call is cpu_do_idle() which must
be done the last.
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>
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r-- | arch/arm/mach-exynos/cpuidle.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 15b9bda1ab6e..144ff1e7bbf8 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -69,7 +69,16 @@ static void restore_cpu_arch_register(void) static int idle_finisher(unsigned long flags) { + exynos_set_wakeupmask(); + + __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR); + __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG); + + /* Set value of power down register for aftr mode */ + exynos_sys_powerdown_conf(SYS_AFTR); + cpu_do_idle(); + return 1; } @@ -79,14 +88,6 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev, { unsigned long tmp; - exynos_set_wakeupmask(); - - /* Set value of power down register for aftr mode */ - exynos_sys_powerdown_conf(SYS_AFTR); - - __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR); - __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG); - save_cpu_arch_register(); /* Setting Central Sequence Register for power down mode */ |