ARM: EXYNOS: Encapsulate boot vector code into a function for cpuidle
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 8 May 2014 21:52:59 +0000 (06:52 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Sun, 25 May 2014 20:21:08 +0000 (05:21 +0900)
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/cpuidle.c

index 717dbf28ede7f21f7c213fce3c079216c7def04a..4e46a12b405697ca9dc59854dfb15bb3bed3802a 100644 (file)
@@ -46,13 +46,16 @@ static void exynos_set_wakeupmask(long mask)
        __raw_writel(mask, S5P_WAKEUP_MASK);
 }
 
+static void exynos_cpu_set_boot_vector(long flags)
+{
+       __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
+       __raw_writel(flags, REG_DIRECTGO_FLAG);
+}
+
 static int idle_finisher(unsigned long flags)
 {
        exynos_set_wakeupmask(0x0000ff3e);
-
-       __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR);
-       __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
-
+       exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);
        /* Set value of power down register for aftr mode */
        exynos_sys_powerdown_conf(SYS_AFTR);