init.qcom.post_boot: Set A57 max freq limit from msm_performance

Thermal mitigation may cause A57s to go offline and their cpufreq
folders might be unavailable which may cause writes to their
scaling_max nodes to be unsuccessful.
Set A57 max freq from msm_performance which provides a usperspace
interface to set frequency limits regardless of core online status.

Change-Id: I734d178f6e05d152444846c7048fd661d1ee7150
This commit is contained in:
Rohit Gupta 2014-12-04 10:47:54 -08:00 committed by Junjie Wu
parent 61bc3433ea
commit 2d1aae987f
1 changed files with 7 additions and 1 deletions

View File

@ -749,7 +749,9 @@ case "$target" in
echo 0 > /sys/devices/system/cpu/cpu6/online
echo 0 > /sys/devices/system/cpu/cpu7/online
# in case CPU4 is online, limit its frequency
echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
# Limit A57 max freq from msm_perf module in case CPU 4 is offline
echo "4:633600 5:633600 6:633600 7:633600" > /sys/module/msm_performance/parameters/cpu_max_freq
# disable thermal bcl hotplug to switch governor
echo 0 > /sys/module/msm_thermal/core_control/enabled
echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode
@ -772,6 +774,8 @@ case "$target" in
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# online CPU4
echo 1 > /sys/devices/system/cpu/cpu4/online
# Best effort limiting for first time boot if msm_performance module is absent
echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
# configure governor settings for big cluster
echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
@ -796,6 +800,8 @@ case "$target" in
echo 1 > /sys/devices/system/cpu/cpu5/online
echo 1 > /sys/devices/system/cpu/cpu6/online
echo 1 > /sys/devices/system/cpu/cpu7/online
# Restore CPU 4 max freq from msm_performance
echo "4:4294967295 5:4294967295 6:4294967295 7:4294967295" > /sys/module/msm_performance/parameters/cpu_max_freq
# input boost configuration
echo 0:1344000 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms