]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/cpufreq.h
[CPUFREQ] allow ondemand and conservative cpufreq governors to be used as default
[linux-2.6-omap-h63xx.git] / include / linux / cpufreq.h
index 3ec6e7ff5fbd3514cb332fac4f4ad18cab98a717..9e5f5d0c87f3465afc97a41271f11f3434d94f84 100644 (file)
@@ -155,6 +155,9 @@ struct cpufreq_governor {
        char    name[CPUFREQ_NAME_LEN];
        int     (*governor)     (struct cpufreq_policy *policy,
                                 unsigned int event);
+       unsigned int max_transition_latency; /* HW must be able to switch to
+                       next freq faster than this value in nano secs or we
+                       will fallback to performance governor */
        struct list_head        governor_list;
        struct module           *owner;
 };
@@ -279,12 +282,23 @@ static inline unsigned int cpufreq_quick_get(unsigned int cpu)
  *********************************************************************/
 
 
-#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
+/*
+  Performance governor is fallback governor if any other gov failed to
+  auto load due latency restrictions
+*/
 extern struct cpufreq_governor cpufreq_gov_performance;
-#define CPUFREQ_DEFAULT_GOVERNOR       &cpufreq_gov_performance
+#define CPUFREQ_PERFORMANCE_GOVERNOR   (&cpufreq_gov_performance)
+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
+#define CPUFREQ_DEFAULT_GOVERNOR       (&cpufreq_gov_performance)
 #elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE)
 extern struct cpufreq_governor cpufreq_gov_userspace;
-#define CPUFREQ_DEFAULT_GOVERNOR       &cpufreq_gov_userspace
+#define CPUFREQ_DEFAULT_GOVERNOR       (&cpufreq_gov_userspace)
+#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND)
+extern struct cpufreq_governor cpufreq_gov_ondemand;
+#define CPUFREQ_DEFAULT_GOVERNOR       (&cpufreq_gov_ondemand)
+#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE)
+extern struct cpufreq_governor cpufreq_gov_conservative;
+#define CPUFREQ_DEFAULT_GOVERNOR       (&cpufreq_gov_conservative)
 #endif