aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 0a5bea9e358..6204c98ce44 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -32,6 +32,9 @@
#include <trace/events/power.h>
+// Safe boot speed
+#define SafeBootSpeed 1200000
+
/**
* The "cpufreq driver" - the arch- or hardware-dependent low
* level driver of CPUFreq support, and its spinlock. This lock
@@ -941,6 +944,11 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
pr_debug("initialization failed\n");
goto err_unlock_policy;
}
+
+ // Set max speed at boot to 1.2Mhz since is the safest speed to boot
+ if (policy->max > SafeBootSpeed)
+ policy->max = SafeBootSpeed;
+
policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;