init: qcom: post_boot: Enable low power modes for 8916, 8939 and 8936
With cluster architecture the low power mode sysfs nodes are changed. Enable all low power modes through single control now for both these targets. Change-Id: I5ea404490742f679bf08fe1053854941afa9453c
This commit is contained in:
parent
f45a812490
commit
aa0066b998
|
@ -337,26 +337,28 @@ esac
|
||||||
|
|
||||||
case "$target" in
|
case "$target" in
|
||||||
"msm8916")
|
"msm8916")
|
||||||
echo 4 > /sys/module/lpm_levels/enable_low_power/l2
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
|
else
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
|
fi
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
|
case "$soc_id" in
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
|
"206")
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
|
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
|
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
|
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
|
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
|
;;
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
|
"239" | "241" )
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
|
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
|
;;
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
|
"233")
|
||||||
echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
|
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
|
||||||
echo 1 > /sys/devices/system/cpu/cpu1/online
|
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu2/online
|
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu3/online
|
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -454,16 +456,66 @@ esac
|
||||||
|
|
||||||
case "$target" in
|
case "$target" in
|
||||||
"msm8916")
|
"msm8916")
|
||||||
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
echo "25000 1094400:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
else
|
||||||
echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
fi
|
||||||
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
|
||||||
echo "85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
# Apply governor settings for 8916
|
||||||
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
case "$soc_id" in
|
||||||
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
|
"206")
|
||||||
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||||
|
echo "25000 1094400:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||||
|
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
||||||
|
echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||||
|
echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
||||||
|
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
||||||
|
echo "85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
|
||||||
|
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Apply governor settings for 8939
|
||||||
|
case "$soc_id" in
|
||||||
|
"239" | "241" )
|
||||||
|
for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
|
||||||
|
do
|
||||||
|
echo "bw_hwmon" > $devfreq_gov
|
||||||
|
done
|
||||||
|
# enable governor for perf cluster
|
||||||
|
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||||
|
echo "25000 800000:50000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
|
||||||
|
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
|
||||||
|
echo 25000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
|
||||||
|
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
|
||||||
|
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
|
||||||
|
echo "85 800000:90" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
|
||||||
|
echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||||
|
# enable governor for power cluster
|
||||||
|
echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
|
||||||
|
echo "25000 499200:50000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
|
||||||
|
echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
|
||||||
|
echo 25000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
|
||||||
|
echo 499200 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
|
||||||
|
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
|
||||||
|
echo "85 499200:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
|
||||||
|
echo 249600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu5/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu6/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu7/online
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue