--- a/arch/arm/mach-msm/acpuclock-8960.c
+++ b/arch/arm/mach-msm/acpuclock-8960.c
@@ -1524,7 +1524,11 @@ static struct acpu_level * __init select
/* Find the max supported scaling frequency. */
for (l = acpu_freq_tbl; l->speed.khz != 0; l++)
if (l->use_for_scaling)
- max_acpu_level = l;
+ if (l->speed.khz <= MAX_FREQ_LIMIT)
+ max_acpu_level = l;
+ else
+ l->use_for_scaling = 0;
+
BUG_ON(!max_acpu_level);
pr_info("Max ACPU freq: %u KHz\n", max_acpu_level->speed.khz);
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -17,6 +17,16 @@ config CPU_FREQ
if CPU_FREQ
+config CPU_FREQ_MIN_SCALING_LIMIT
+ int "Min CPU Scaling Frequency Limit"
+ depends on CPU_FREQ
+ default 384000
+
+config CPU_FREQ_MAX_SCALING_LIMIT
+ int "Max CPU Scaling Frequency Limit"
+ depends on CPU_FREQ
+ default 1900000
+
config CPU_FREQ_TABLE
tristate
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -605,7 +605,6 @@ static ssize_t store_scaling_governor(st
will be wrongly overridden */
ret = __cpufreq_set_policy(policy, &new_policy);
- if (policy->max > 1512000) policy->max = 1512000;
policy->user_policy.policy = policy->policy;
policy->user_policy.governor = policy->governor;
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -352,8 +352,8 @@ static inline unsigned int cpufreq_quick
#define LOW_MAX_FREQ_LIMIT 1188000
-#define MIN_FREQ_LIMIT 384000
-#define MAX_FREQ_LIMIT 2106000
+#define MIN_FREQ_LIMIT CONFIG_CPU_FREQ_MIN_SCALING_LIMIT
+#define MAX_FREQ_LIMIT CONFIG_CPU_FREQ_MAX_SCALING_LIMIT
#define FREQ_TABLE_SIZE 38
#define FREQ_TABLE_SIZE_OFFSET 6
#define FREQ_STEPS 30