aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq/arm_big_little.h
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-19 17:11:08 +0100
committerMark Brown <broonie@linaro.org>2013-07-19 17:11:08 +0100
commit70ca852fcdefc60de2e238c0ef4c0fe66b1f4fcc (patch)
tree776ce6c950ce20f2259c89c454d990e4f7ee8556 /drivers/cpufreq/arm_big_little.h
parent702f80ea2f3c335b94589ec18f249542e438ffb0 (diff)
parentca872d5c4d01f842b91bb5c8cb3d8d3c990e39ff (diff)
downloadvexpress-lsk-70ca852fcdefc60de2e238c0ef4c0fe66b1f4fcc.tar.gz
Merge remote-tracking branch 'lsk/v3.10/topic/tc2' into linux-linaro-lsk
Diffstat (limited to 'drivers/cpufreq/arm_big_little.h')
-rw-r--r--drivers/cpufreq/arm_big_little.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/cpufreq/arm_big_little.h b/drivers/cpufreq/arm_big_little.h
index 79b2ce17884..4f5a03d3aef 100644
--- a/drivers/cpufreq/arm_big_little.h
+++ b/drivers/cpufreq/arm_big_little.h
@@ -23,6 +23,20 @@
#include <linux/device.h>
#include <linux/types.h>
+/* Currently we support only two clusters */
+#define A15_CLUSTER 0
+#define A7_CLUSTER 1
+#define MAX_CLUSTERS 2
+
+#ifdef CONFIG_BL_SWITCHER
+extern bool bL_switching_enabled;
+#define is_bL_switching_enabled() bL_switching_enabled
+#define set_switching_enabled(x) (bL_switching_enabled = (x))
+#else
+#define is_bL_switching_enabled() false
+#define set_switching_enabled(x) do { } while (0)
+#endif
+
struct cpufreq_arm_bL_ops {
char name[CPUFREQ_NAME_LEN];
int (*get_transition_latency)(struct device *cpu_dev);
@@ -36,7 +50,8 @@ struct cpufreq_arm_bL_ops {
static inline int cpu_to_cluster(int cpu)
{
- return topology_physical_package_id(cpu);
+ return is_bL_switching_enabled() ? MAX_CLUSTERS:
+ topology_physical_package_id(cpu);
}
int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops);