op_cpuspeed.sh: update cpufreq after clock change
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 15 Mar 2012 21:14:59 +0000 (23:14 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Thu, 15 Mar 2012 21:14:59 +0000 (23:14 +0200)
3.2 uses cpufreq to change clock, so need to "poke" it.

recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_cpuspeed.sh

index 4d6af05..c747f5b 100644 (file)
@@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
-PR = "r85"
+PR = "r86"
 
 SRC_URI = " \
           file://op_paths.sh \
index 508df2c..39855dc 100755 (executable)
@@ -46,4 +46,11 @@ if [ $newmhz ]; then
         if [ $newmhz -ge $maxmhz ]; then newmhz=$maxmhz; fi
        echo $newmhz > $device
        echo cpu_mhz_max set to $(cat $device)
+
+       if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
+               # must poke cpufreq so it does the actual clock transition
+               # according to new limits
+               gov=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
+               echo $gov > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+       fi
 fi