Replace MSM_CPU_FREQ_ONDEMAND_MIN/MAX with CPU_FREQ_MIN/MAX, and move to cpufreq ...

file:f738d6c28a76288d19a9bfa6831207097eb2d43b -> file:52723adad3f4e1481548d1c3bb4fd3240d4d1c84
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -93,22 +93,22 @@ config PERFLOCK_SCREEN_POLICY
config PERFLOCK_SCREEN_ON_MIN
depends on PERFLOCK_SCREEN_POLICY
int "Minimum speed while screen on"
- default MSM_CPU_FREQ_ONDEMAND_MIN
+ default CPU_FREQ_MIN_FREQ
config PERFLOCK_SCREEN_ON_MAX
depends on PERFLOCK_SCREEN_POLICY
int "Maximum speed while screen on"
- default MSM_CPU_FREQ_ONDEMAND_MAX
+ default CPU_FREQ_MAX_FREQ
config PERFLOCK_SCREEN_OFF_MIN
depends on PERFLOCK_SCREEN_POLICY
int "Minimum speed while screen off"
- default MSM_CPU_FREQ_ONDEMAND_MIN
+ default CPU_FREQ_MIN_FREQ
config PERFLOCK_SCREEN_OFF_MAX
depends on PERFLOCK_SCREEN_POLICY
int "Maximum speed while screen off"
- default MSM_CPU_FREQ_ONDEMAND_MIN
+ default CPU_FREQ_MIN_FREQ
config MSM_AMSS_VERSION
int
@@ -702,14 +702,6 @@ config MSM_CPU_FREQ_SCREEN_ON
endif # MSM_CPU_FREQ_SCREEN
-config MSM_CPU_FREQ_ONDEMAND_MAX
- int "Max"
- default 384000
-
-config MSM_CPU_FREQ_ONDEMAND_MIN
- int "Min"
- default 245760
-
config MSM_HW3D
tristate "MSM Hardware 3D Register Driver"
depends on EARLYSUSPEND
file:79a124b8514fa1f6acc54e27bb26a22621534c50 -> file:2d6335825dd916f9b3b8ad0d040af13ff05a4135
--- a/arch/arm/mach-msm/cpufreq.c
+++ b/arch/arm/mach-msm/cpufreq.c
@@ -22,11 +22,6 @@
#include <linux/init.h>
#include "acpuclock.h"
-/* Make sure the kernel is not overclocked on boot to avoid potential freezing/boot loops
- * for people with less capable hardware. */
-#define CPUFREQ_MAX 998400
-#define CPUFREQ_MIN 245760
-
#ifdef CONFIG_MSM_CPU_FREQ_SCREEN
static void msm_early_suspend(struct early_suspend *handler) {
acpuclk_set_rate(CONFIG_MSM_CPU_FREQ_SCREEN_OFF * 1000, 0);
@@ -95,8 +90,8 @@ static int __init msm_cpufreq_init(struc
BUG_ON(cpufreq_frequency_table_cpuinfo(policy, table));
policy->cur = acpuclk_get_rate();
- policy->max = CPUFREQ_MAX;
- policy->min = CPUFREQ_MIN;
+ policy->max = CONFIG_CPU_FREQ_MAX_FREQ;
+ policy->min = CONFIG_CPU_FREQ_MIN_FREQ;
policy->cpuinfo.transition_latency =
acpuclk_get_switch_time() * NSEC_PER_USEC;
return 0;
file:31171601e0bd709329d24e92427696713f8876b2 -> file:926b66be0c0af062b2214e61dec4f36a30e4e67e
--- a/arch/arm/mach-msm/perflock.c
+++ b/arch/arm/mach-msm/perflock.c
@@ -139,8 +139,8 @@ late_initcall(perflock_screen_policy_ini
#endif
#if 0
-static unsigned int policy_min = CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN;
-static unsigned int policy_max = CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX;
+static unsigned int policy_min = CONFIG_CPU_FREQ_MIN_FREQ;
+static unsigned int policy_max = CONFIG_CPU_FREQ_MAX_FREQ;
#else
static unsigned int policy_min;
static unsigned int policy_max;
@@ -177,7 +177,7 @@ static int perflock_notifier_call(struct
pr_info("%s: screen_off_policy_req %d,"
"policy_min %d\n", __func__,
screen_off_policy_req,
- CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN);
+ CONFIG_CPU_FREQ_MIN_FREQ);
policy_min = CONFIG_PERFLOCK_SCREEN_OFF_MIN;
policy_max = CONFIG_PERFLOCK_SCREEN_OFF_MAX;
screen_off_policy_req--;
file:67ce37adfcd422b9860500515d953fcf141f42ec -> file:7efd3a9d0554ddbee2d173236f4cb5f9e54fe5e2
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -15,6 +15,17 @@ config CPU_FREQ
if CPU_FREQ
+config CPU_FREQ_MIN_FREQ
+ int "Minimum CPU Frequency"
+ default 245000
+
+config CPU_FREQ_MAX_FREQ
+ int "Maximum CPU Frequency"
+ default 998400
+ help
+ WARNING: Since not all devices are made equal, do not set this higher
+ than the stock frequency.
+
config CPU_FREQ_TABLE
tristate