aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq806x')
-rwxr-xr-xtarget/linux/ipq806x/base-files/etc/init.d/cpufreq17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/ipq806x/base-files/etc/init.d/cpufreq b/target/linux/ipq806x/base-files/etc/init.d/cpufreq
new file mode 100755
index 0000000000..19278902ed
--- /dev/null
+++ b/target/linux/ipq806x/base-files/etc/init.d/cpufreq
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+
+START=15
+
+boot() {
+ local governor
+
+ governor=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor)
+
+ if [ "$governor" = "ondemand" ]; then
+ # Effective only with ondemand
+ echo 600000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
+ echo 600000 > /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ fi
+}