From 8a26958aedbe2396762c97c605c4dd716d48bdee Mon Sep 17 00:00:00 2001 From: kszaq Date: Mon, 19 Jan 2015 00:04:21 +0100 Subject: [PATCH] (wetek_play) platform_init: Assume SMP uses shared cpufreq policy for all CPUs --- projects/WeTek_Play/initramfs/platform_init | 23 +++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/projects/WeTek_Play/initramfs/platform_init b/projects/WeTek_Play/initramfs/platform_init index 434f132c24..5e32a6847f 100755 --- a/projects/WeTek_Play/initramfs/platform_init +++ b/projects/WeTek_Play/initramfs/platform_init @@ -61,14 +61,15 @@ echo rm default > /sys/class/vfm/map echo add default decoder ppmgr deinterlace amvideo > /sys/class/vfm/map # Boot with performance governor, then switch to the governor specified in the kernel command line -for cpufreq in /sys/devices/system/cpu/cpu[0-9]*/cpufreq; do - if [ -n "$scaling_governor" ]; then - echo "$scaling_governor" > "$cpufreq/scaling_governor" - fi - if [ -n "$scaling_min_freq" ]; then - echo "$scaling_min_freq" > "$cpufreq/scaling_min_freq" - fi - if [ -n "$scaling_max_freq" ]; then - echo "$scaling_max_freq" > "$cpufreq/scaling_max_freq" - fi -done +# Assume SMP uses shared cpufreq policy for all CPUs +cpufreq="/sys/devices/system/cpu/cpu0/cpufreq" +if [ -n "$scaling_governor" ]; then + echo "$scaling_governor" > "$cpufreq/scaling_governor" +fi +if [ -n "$scaling_min_freq" ]; then + echo "$scaling_min_freq" > "$cpufreq/scaling_min_freq" +fi +if [ -n "$scaling_max_freq" ]; then + echo "$scaling_max_freq" > "$cpufreq/scaling_max_freq" + echo "$scaling_max_freq" > "$cpufreq/scaling_dflt_freq" +fi