ARM: tegra: power: Re-factor power headers.
Alex Frid [Sun, 10 Jul 2011 01:38:04 +0000 (18:38 -0700)]
Renamed and moved tegra cpu related function prototypes from power.h
to tegra-cpu.h. No functional changes.

Original-Change-Id: I24c25c9434bf7008e0875d1f74be502cd902c4ba
Reviewed-on: http://git-master/r/40532
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R3d90799453a86a5a9ed012d2bfe373715de6d5c3

arch/arm/mach-tegra/cpu-tegra.c
arch/arm/mach-tegra/cpu-tegra.h
arch/arm/mach-tegra/cpu-tegra3.c
arch/arm/mach-tegra/pm.h

index efbbc80..7f9e8c6 100644 (file)
@@ -37,7 +37,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 */
@@ -114,7 +114,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);
@@ -249,7 +249,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);
 
@@ -288,7 +288,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;
        }
@@ -438,7 +438,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();
 
@@ -471,7 +471,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:
@@ -496,7 +496,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);
        }
index ea566d8..53b3215 100644 (file)
 #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
@@ -28,4 +34,18 @@ static inline void tegra_throttling_enable(bool enable)
 {}
 #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 */
index a597d24..3c46b1f 100644 (file)
@@ -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()) {
index 837ff00..cdf8007 100644 (file)
@@ -79,26 +79,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);
 
 /*