summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.c14
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.h20
-rw-r--r--arch/arm/mach-tegra/cpu-tegra3.c3
-rw-r--r--arch/arm/mach-tegra/pm.h20
4 files changed, 29 insertions, 28 deletions
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c
index ad8c359e2249..154a4056bc27 100644
--- a/arch/arm/mach-tegra/cpu-tegra.c
+++ b/arch/arm/mach-tegra/cpu-tegra.c
@@ -40,7 +40,7 @@
#include <mach/edp.h>
#include "clock.h"
-#include "pm.h"
+#include "cpu-tegra.h"
/* tegra throttling and edp governors require frequencies in the table
to be in ascending order */
@@ -117,7 +117,7 @@ void tegra_throttling_enable(bool enable)
cancel_delayed_work_sync(&throttle_work);
is_throttling = false;
/* restore speed requested by governor */
- tegra_cpu_cap_highest_speed(NULL);
+ tegra_cpu_set_speed_cap(NULL);
}
mutex_unlock(&tegra_cpu_lock);
@@ -252,7 +252,7 @@ int tegra_edp_update_thermal_zone(int temperature)
/* Update cpu rate if cpufreq (at least on cpu0) is already started */
if (target_cpu_speed[0]) {
edp_update_limit();
- tegra_cpu_cap_highest_speed(NULL);
+ tegra_cpu_set_speed_cap(NULL);
}
mutex_unlock(&tegra_cpu_lock);
@@ -291,7 +291,7 @@ static int tegra_cpu_edp_notify(
mutex_lock(&tegra_cpu_lock);
cpu_clear(cpu, edp_cpumask);
edp_update_limit();
- tegra_cpu_cap_highest_speed(NULL);
+ tegra_cpu_set_speed_cap(NULL);
mutex_unlock(&tegra_cpu_lock);
break;
}
@@ -441,7 +441,7 @@ unsigned long tegra_cpu_highest_speed(void) {
return rate;
}
-int tegra_cpu_cap_highest_speed(unsigned int *speed_cap)
+int tegra_cpu_set_speed_cap(unsigned int *speed_cap)
{
unsigned int new_speed = tegra_cpu_highest_speed();
@@ -474,7 +474,7 @@ static int tegra_target(struct cpufreq_policy *policy,
freq = freq_table[idx].frequency;
target_cpu_speed[policy->cpu] = freq;
- ret = tegra_cpu_cap_highest_speed(&new_speed);
+ ret = tegra_cpu_set_speed_cap(&new_speed);
if (ret == 0)
tegra_auto_hotplug_governor(new_speed, false);
out:
@@ -499,7 +499,7 @@ static int tegra_pm_notify(struct notifier_block *nb, unsigned long event,
unsigned int freq;
is_suspended = false;
tegra_cpu_edp_init(true);
- tegra_cpu_cap_highest_speed(&freq);
+ tegra_cpu_set_speed_cap(&freq);
pr_info("Tegra cpufreq resume: restoring frequency to %d kHz\n",
freq);
}
diff --git a/arch/arm/mach-tegra/cpu-tegra.h b/arch/arm/mach-tegra/cpu-tegra.h
index 6c6e40a9fce9..eaa230574763 100644
--- a/arch/arm/mach-tegra/cpu-tegra.h
+++ b/arch/arm/mach-tegra/cpu-tegra.h
@@ -21,10 +21,30 @@
#ifndef __MACH_TEGRA_CPU_TEGRA_H
#define __MACH_TEGRA_CPU_TEGRA_H
+int tegra_cpu_set_speed_cap(unsigned int *speed_cap);
+unsigned int tegra_count_slow_cpus(unsigned long speed_limit);
+unsigned int tegra_get_slowest_cpu_n(void);
+unsigned long tegra_cpu_lowest_speed(void);
+unsigned long tegra_cpu_highest_speed(void);
+
#ifdef CONFIG_TEGRA_THERMAL_THROTTLE
void tegra_throttling_enable(bool enable);
#else
#define tegra_throttling_enable NULL
#endif /* CONFIG_TEGRA_THERMAL_THROTTLE */
+#if defined(CONFIG_TEGRA_AUTO_HOTPLUG) && !defined(CONFIG_ARCH_TEGRA_2x_SOC)
+int tegra_auto_hotplug_init(struct mutex *cpu_lock);
+void tegra_auto_hotplug_exit(void);
+void tegra_auto_hotplug_governor(unsigned int cpu_freq, bool suspend);
+#else
+static inline int tegra_auto_hotplug_init(struct mutex *cpu_lock)
+{ return 0; }
+static inline void tegra_auto_hotplug_exit(void)
+{ }
+static inline void tegra_auto_hotplug_governor(unsigned int cpu_freq,
+ bool suspend)
+{ }
+#endif
+
#endif /* __MACH_TEGRA_CPU_TEGRA_H */
diff --git a/arch/arm/mach-tegra/cpu-tegra3.c b/arch/arm/mach-tegra/cpu-tegra3.c
index dcdad84f447f..9dfa40dcef67 100644
--- a/arch/arm/mach-tegra/cpu-tegra3.c
+++ b/arch/arm/mach-tegra/cpu-tegra3.c
@@ -34,6 +34,7 @@
#include <linux/seq_file.h>
#include "pm.h"
+#include "cpu-tegra.h"
#include "clock.h"
#define INITIAL_STATE TEGRA_HP_DISABLED
@@ -228,7 +229,7 @@ static void tegra_auto_hotplug_work_func(struct work_struct *work)
hp_stats_update(CONFIG_NR_CPUS, false);
hp_stats_update(0, true);
/* catch-up with governor target speed */
- tegra_cpu_cap_highest_speed(NULL);
+ tegra_cpu_set_speed_cap(NULL);
}
} else {
switch (tegra_cpu_speed_balance()) {
diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h
index 49cd77f9b584..af03188c9e1d 100644
--- a/arch/arm/mach-tegra/pm.h
+++ b/arch/arm/mach-tegra/pm.h
@@ -81,26 +81,6 @@ int tegra_suspend_dram(enum tegra_suspend_mode mode);
void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat);
-unsigned int tegra_count_slow_cpus(unsigned long speed_limit);
-unsigned int tegra_get_slowest_cpu_n(void);
-unsigned long tegra_cpu_lowest_speed(void);
-unsigned long tegra_cpu_highest_speed(void);
-int tegra_cpu_cap_highest_speed(unsigned int *speed_cap);
-
-#if defined(CONFIG_TEGRA_AUTO_HOTPLUG) && !defined(CONFIG_ARCH_TEGRA_2x_SOC)
-int tegra_auto_hotplug_init(struct mutex *cpu_lock);
-void tegra_auto_hotplug_exit(void);
-void tegra_auto_hotplug_governor(unsigned int cpu_freq, bool suspend);
-#else
-static inline int tegra_auto_hotplug_init(struct mutex *cpu_lock)
-{ return 0; }
-static inline void tegra_auto_hotplug_exit(void)
-{ }
-static inline void tegra_auto_hotplug_governor(unsigned int cpu_freq,
- bool suspend)
-{ }
-#endif
-
u64 tegra_rtc_read_ms(void);
/*