aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/cpuidle-tegra30.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/cpuidle-tegra30.c')
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra30.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index 3cf9aca5f3ea..ed2a2a7bae4d 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -114,16 +114,15 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
114 struct cpuidle_driver *drv, 114 struct cpuidle_driver *drv,
115 int index) 115 int index)
116{ 116{
117 u32 cpu = is_smp() ? cpu_logical_map(dev->cpu) : dev->cpu;
118 bool entered_lp2 = false; 117 bool entered_lp2 = false;
119 bool last_cpu; 118 bool last_cpu;
120 119
121 local_fiq_disable(); 120 local_fiq_disable();
122 121
123 last_cpu = tegra_set_cpu_in_lp2(cpu); 122 last_cpu = tegra_set_cpu_in_lp2();
124 cpu_pm_enter(); 123 cpu_pm_enter();
125 124
126 if (cpu == 0) { 125 if (dev->cpu == 0) {
127 if (last_cpu) 126 if (last_cpu)
128 entered_lp2 = tegra30_cpu_cluster_power_down(dev, drv, 127 entered_lp2 = tegra30_cpu_cluster_power_down(dev, drv,
129 index); 128 index);
@@ -134,7 +133,7 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
134 } 133 }
135 134
136 cpu_pm_exit(); 135 cpu_pm_exit();
137 tegra_clear_cpu_in_lp2(cpu); 136 tegra_clear_cpu_in_lp2();
138 137
139 local_fiq_enable(); 138 local_fiq_enable();
140 139
@@ -146,8 +145,5 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
146 145
147int __init tegra30_cpuidle_init(void) 146int __init tegra30_cpuidle_init(void)
148{ 147{
149#ifdef CONFIG_PM_SLEEP
150 tegra_tear_down_cpu = tegra30_tear_down_cpu;
151#endif
152 return cpuidle_register(&tegra_idle_driver, NULL); 148 return cpuidle_register(&tegra_idle_driver, NULL);
153} 149}