summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/cpu-tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/cpu-tegra.c')
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c
index 3da60ac97072..ea6b7aaffa90 100644
--- a/arch/arm/mach-tegra/cpu-tegra.c
+++ b/arch/arm/mach-tegra/cpu-tegra.c
@@ -36,6 +36,7 @@
#include <mach/clk.h>
#include "clock.h"
+#include "pm.h"
static struct cpufreq_frequency_table *freq_table;
@@ -283,6 +284,10 @@ static int tegra_target(struct cpufreq_policy *policy,
ret = tegra_update_cpu_speed(new_speed);
out:
mutex_unlock(&tegra_cpu_lock);
+
+ if (ret == 0)
+ tegra_auto_hotplug_governor(new_speed);
+
return ret;
}
@@ -373,6 +378,8 @@ static struct cpufreq_driver tegra_cpufreq_driver = {
static int __init tegra_cpufreq_init(void)
{
+ int ret = 0;
+
struct tegra_cpufreq_table_data *table_data =
tegra_cpufreq_table_get();
BUG_ON(!table_data);
@@ -392,6 +399,10 @@ static int __init tegra_cpufreq_init(void)
throttle_lowest_index = table_data->throttle_lowest_index;
throttle_highest_index = table_data->throttle_highest_index;
#endif
+ ret = tegra_auto_hotplug_init();
+ if (ret)
+ return ret;
+
freq_table = table_data->freq_table;
return cpufreq_register_driver(&tegra_cpufreq_driver);
}
@@ -401,6 +412,7 @@ static void __exit tegra_cpufreq_exit(void)
#ifdef CONFIG_TEGRA_THERMAL_THROTTLE
destroy_workqueue(workqueue);
#endif
+ tegra_auto_hotplug_exit();
cpufreq_unregister_driver(&tegra_cpufreq_driver);
}