aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-02-04 07:01:42 -0500
committerLen Brown <len.brown@intel.com>2013-02-08 18:31:16 -0500
commit8d60143a2367616a9d4f7c11656ade8521eb1874 (patch)
tree1a50d52a173025bbdf48829afce7ff8c2c93acbd
parent5af4a21c6efd270a334202fb1fc4a347ea4624e3 (diff)
davinci: cpuidle - move code to prevent forward declaration
The patch is mindless, it just moves the idle function below in the file in order to prevent forward declaration in the next patch. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--arch/arm/mach-davinci/cpuidle.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c
index 5fbd470d46ca..697febe5a8e5 100644
--- a/arch/arm/mach-davinci/cpuidle.c
+++ b/arch/arm/mach-davinci/cpuidle.c
@@ -31,42 +31,6 @@ struct davinci_ops {
31 u32 flags; 31 u32 flags;
32}; 32};
33 33
34/* Actual code that puts the SoC in different idle states */
35static int davinci_enter_idle(struct cpuidle_device *dev,
36 struct cpuidle_driver *drv,
37 int index)
38{
39 struct cpuidle_state_usage *state_usage = &dev->states_usage[index];
40 struct davinci_ops *ops = cpuidle_get_statedata(state_usage);
41
42 if (ops && ops->enter)
43 ops->enter();
44
45 index = cpuidle_wrap_enter(dev, drv, index,
46 arm_cpuidle_simple_enter);
47
48 if (ops && ops->exit)
49 ops->exit();
50
51 return index;
52}
53
54static struct cpuidle_driver davinci_idle_driver = {
55 .name = "cpuidle-davinci",
56 .owner = THIS_MODULE,
57 .en_core_tk_irqen = 1,
58 .states[0] = ARM_CPUIDLE_WFI_STATE,
59 .states[1] = {
60 .enter = davinci_enter_idle,
61 .exit_latency = 10,
62 .target_residency = 100000,
63 .flags = CPUIDLE_FLAG_TIME_VALID,
64 .name = "DDR SR",
65 .desc = "WFI and DDR Self Refresh",
66 },
67 .state_count = DAVINCI_CPUIDLE_MAX_STATES,
68};
69
70static DEFINE_PER_CPU(struct cpuidle_device, davinci_cpuidle_device); 34static DEFINE_PER_CPU(struct cpuidle_device, davinci_cpuidle_device);
71static void __iomem *ddr2_reg_base; 35static void __iomem *ddr2_reg_base;
72static bool ddr2_pdown; 36static bool ddr2_pdown;
@@ -107,6 +71,42 @@ static struct davinci_ops davinci_states[DAVINCI_CPUIDLE_MAX_STATES] = {
107 }, 71 },
108}; 72};
109 73
74/* Actual code that puts the SoC in different idle states */
75static int davinci_enter_idle(struct cpuidle_device *dev,
76 struct cpuidle_driver *drv,
77 int index)
78{
79 struct cpuidle_state_usage *state_usage = &dev->states_usage[index];
80 struct davinci_ops *ops = cpuidle_get_statedata(state_usage);
81
82 if (ops && ops->enter)
83 ops->enter();
84
85 index = cpuidle_wrap_enter(dev, drv, index,
86 arm_cpuidle_simple_enter);
87
88 if (ops && ops->exit)
89 ops->exit();
90
91 return index;
92}
93
94static struct cpuidle_driver davinci_idle_driver = {
95 .name = "cpuidle-davinci",
96 .owner = THIS_MODULE,
97 .en_core_tk_irqen = 1,
98 .states[0] = ARM_CPUIDLE_WFI_STATE,
99 .states[1] = {
100 .enter = davinci_enter_idle,
101 .exit_latency = 10,
102 .target_residency = 100000,
103 .flags = CPUIDLE_FLAG_TIME_VALID,
104 .name = "DDR SR",
105 .desc = "WFI and DDR Self Refresh",
106 },
107 .state_count = DAVINCI_CPUIDLE_MAX_STATES,
108};
109
110static int __init davinci_cpuidle_probe(struct platform_device *pdev) 110static int __init davinci_cpuidle_probe(struct platform_device *pdev)
111{ 111{
112 int ret; 112 int ret;