Overclocking and expand voltages
/arch/arm/mach-msm/cpufreq.c
blob:53179912402270b20e3aefbce656a8c495f7c996 -> blob:79a124b8514fa1f6acc54e27bb26a22621534c50
--- arch/arm/mach-msm/cpufreq.c
+++ arch/arm/mach-msm/cpufreq.c
@@ -22,6 +22,11 @@
#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);
@@ -90,6 +95,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->cpuinfo.transition_latency =
acpuclk_get_switch_time() * NSEC_PER_USEC;
return 0;