aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/cpuidle-tegra20.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/cpuidle-tegra20.c')
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra20.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index f1f6ac40d714..590ec25855dd 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -70,8 +70,6 @@ static struct cpuidle_driver tegra_idle_driver = {
70 .safe_state_index = 0, 70 .safe_state_index = 0,
71}; 71};
72 72
73static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
74
75#ifdef CONFIG_PM_SLEEP 73#ifdef CONFIG_PM_SLEEP
76#ifdef CONFIG_SMP 74#ifdef CONFIG_SMP
77static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); 75static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
@@ -220,34 +218,8 @@ static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
220 218
221int __init tegra20_cpuidle_init(void) 219int __init tegra20_cpuidle_init(void)
222{ 220{
223 int ret;
224 unsigned int cpu;
225 struct cpuidle_device *dev;
226 struct cpuidle_driver *drv = &tegra_idle_driver;
227
228#ifdef CONFIG_PM_SLEEP 221#ifdef CONFIG_PM_SLEEP
229 tegra_tear_down_cpu = tegra20_tear_down_cpu; 222 tegra_tear_down_cpu = tegra20_tear_down_cpu;
230#endif 223#endif
231 224 return cpuidle_register(&tegra_idle_driver, cpu_possible_mask);
232 ret = cpuidle_register_driver(&tegra_idle_driver);
233 if (ret) {
234 pr_err("CPUidle driver registration failed\n");
235 return ret;
236 }
237
238 for_each_possible_cpu(cpu) {
239 dev = &per_cpu(tegra_idle_device, cpu);
240 dev->cpu = cpu;
241#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
242 dev->coupled_cpus = *cpu_possible_mask;
243#endif
244
245 ret = cpuidle_register_device(dev);
246 if (ret) {
247 pr_err("CPU%u: CPUidle device registration failed\n",
248 cpu);
249 return ret;
250 }
251 }
252 return 0;
253} 225}