aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/cpuidle.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2014-05-08 17:43:26 -0400
committerKukjin Kim <kgene.kim@samsung.com>2014-05-25 16:21:06 -0400
commit53af16a1a8d6776b19747291b39f0d4cbda42d92 (patch)
tree4ac43275066b686540eded74b15dccb14b591077 /arch/arm/mach-exynos/cpuidle.c
parent9a8f39950d276bc77d3eb22bfc798c4612ee3c29 (diff)
ARM: EXYNOS: Prevent forward declaration for cpuidle
Move the structure below the 'exynos4_enter_lowpower' function so no more need of forward declaration. 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/cpuidle.c')
-rw-r--r--arch/arm/mach-exynos/cpuidle.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 8125a1534093..56780c64a620 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -41,30 +41,8 @@
41 41
42#define S5P_CHECK_AFTR 0xFCBA0D10 42#define S5P_CHECK_AFTR 0xFCBA0D10
43 43
44static int exynos4_enter_lowpower(struct cpuidle_device *dev,
45 struct cpuidle_driver *drv,
46 int index);
47
48static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); 44static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device);
49 45
50static struct cpuidle_driver exynos4_idle_driver = {
51 .name = "exynos4_idle",
52 .owner = THIS_MODULE,
53 .states = {
54 [0] = ARM_CPUIDLE_WFI_STATE,
55 [1] = {
56 .enter = exynos4_enter_lowpower,
57 .exit_latency = 300,
58 .target_residency = 100000,
59 .flags = CPUIDLE_FLAG_TIME_VALID,
60 .name = "C1",
61 .desc = "ARM power down",
62 },
63 },
64 .state_count = 2,
65 .safe_state_index = 0,
66};
67
68/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ 46/* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */
69static void exynos4_set_wakeupmask(void) 47static void exynos4_set_wakeupmask(void)
70{ 48{
@@ -163,6 +141,24 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev,
163 return exynos4_enter_core0_aftr(dev, drv, new_index); 141 return exynos4_enter_core0_aftr(dev, drv, new_index);
164} 142}
165 143
144static struct cpuidle_driver exynos4_idle_driver = {
145 .name = "exynos4_idle",
146 .owner = THIS_MODULE,
147 .states = {
148 [0] = ARM_CPUIDLE_WFI_STATE,
149 [1] = {
150 .enter = exynos4_enter_lowpower,
151 .exit_latency = 300,
152 .target_residency = 100000,
153 .flags = CPUIDLE_FLAG_TIME_VALID,
154 .name = "C1",
155 .desc = "ARM power down",
156 },
157 },
158 .state_count = 2,
159 .safe_state_index = 0,
160};
161
166static int exynos_cpuidle_probe(struct platform_device *pdev) 162static int exynos_cpuidle_probe(struct platform_device *pdev)
167{ 163{
168 int cpu_id, ret; 164 int cpu_id, ret;