sm6375-common: Drop power init script
* Switch back to old init script for power stuffs. * Bring back post boot script. Change-Id: Ifca0be0f7bb767dfeb601083e66e73c88521f880
This commit is contained in:
parent
1f580a9b66
commit
74fce3f5d0
5 changed files with 6543 additions and 143 deletions
|
|
@ -1,142 +0,0 @@
|
|||
# Copyright (c) 2016, Code Aurora Forum. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Code Aurora nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
on init
|
||||
# Disable UFS powersaving
|
||||
write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 0
|
||||
write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 0
|
||||
|
||||
# Disable powersaving
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled 1
|
||||
|
||||
# Bring all cores online
|
||||
write /sys/devices/system/cpu/cpu0/online 1
|
||||
write /sys/devices/system/cpu/cpu1/online 1
|
||||
write /sys/devices/system/cpu/cpu2/online 1
|
||||
write /sys/devices/system/cpu/cpu3/online 1
|
||||
write /sys/devices/system/cpu/cpu4/online 1
|
||||
write /sys/devices/system/cpu/cpu5/online 1
|
||||
write /sys/devices/system/cpu/cpu6/online 1
|
||||
write /sys/devices/system/cpu/cpu7/online 1
|
||||
|
||||
# Configure governor settings for little cluster
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "schedutil"
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 20000
|
||||
|
||||
# Configure governor settings for big cluster
|
||||
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor "schedutil"
|
||||
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us 20000
|
||||
|
||||
on boot
|
||||
# For cpusets initialize for Silver only first and then Silver + Gold
|
||||
# Silver only configuration cannot work with 0-7
|
||||
write /dev/cpuset/top-app/cpus 0-3
|
||||
write /dev/cpuset/audio-app/cpus 1-2
|
||||
write /dev/cpuset/foreground/cpus 0-3
|
||||
write /dev/cpuset/foreground/boost/cpus 0-3
|
||||
write /dev/cpuset/background/cpus 0-3
|
||||
write /dev/cpuset/system-background/cpus 0-3
|
||||
write /dev/cpuset/top-app/cpus 0-7
|
||||
write /dev/cpuset/foreground/cpus 0-7
|
||||
write /dev/cpuset/foreground/boost/cpus 0-7
|
||||
write /dev/cpuset/background/cpus 0-7
|
||||
write /dev/cpuset/system-background/cpus 0-7
|
||||
|
||||
# Disable console_suspend to get better logging for kernel crashes
|
||||
write /sys/module/printk/parameters/console_suspend N
|
||||
|
||||
on property:init.svc.vendor.charger=running
|
||||
setprop persist.sys.usb.config mass_storage
|
||||
|
||||
# Keep one LITTLE and one big
|
||||
write /sys/devices/system/cpu/cpu1/online 0
|
||||
write /sys/devices/system/cpu/cpu2/online 0
|
||||
write /sys/devices/system/cpu/cpu3/online 0
|
||||
write /sys/devices/system/cpu/cpu5/online 0
|
||||
write /sys/devices/system/cpu/cpu6/online 0
|
||||
write /sys/devices/system/cpu/cpu7/online 0
|
||||
wait /dev/block/bootdevice
|
||||
|
||||
# Enable UFS powersaving
|
||||
write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 1
|
||||
write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 1
|
||||
|
||||
# Turn on sleep modes
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
||||
|
||||
start vendor.power_off_alarm
|
||||
mount tmpfs tmpfs /data
|
||||
setprop sys.usb.controller 4e00000.dwc3
|
||||
setprop sys.usb.configfs 1
|
||||
|
||||
on enable-low-power
|
||||
# Set the default IRQ affinity to the silver cluster.
|
||||
# When a CPU is isolated/hotplugged, the IRQ affinity is adjusted
|
||||
# to one of the CPU from the default IRQ affinity mask.
|
||||
write /proc/irq/default_smp_affinity "f"
|
||||
|
||||
# Setting b.L scheduler parameters
|
||||
write /proc/sys/kernel/sched_upmigrate 95
|
||||
write /proc/sys/kernel/sched_downmigrate 85
|
||||
write /proc/sys/kernel/sched_group_upmigrate 100
|
||||
write /proc/sys/kernel/sched_group_downmigrate 95
|
||||
write /proc/sys/kernel/sched_walt_rotate_big_tasks 1
|
||||
|
||||
# Set cpuset parameters
|
||||
write /dev/cpuset/background/cpus 0-1
|
||||
write /dev/cpuset/system-background/cpus 0-3
|
||||
write /dev/cpuset/foreground/boost/cpus 0-3,6-7
|
||||
write /dev/cpuset/foreground/cpus 0-3,6-7
|
||||
write /dev/cpuset/top-app/cpus 0-7
|
||||
write /dev/cpuset/restricted/cpus 0-3
|
||||
|
||||
# Setup final cpu.uclamp
|
||||
write /dev/cpuctl/background/cpu.uclamp.max 50
|
||||
write /dev/cpuctl/system-background/cpu.uclamp.max 50
|
||||
write /dev/cpuctl/dex2oat/cpu.uclamp.max 60
|
||||
|
||||
# Turn on sleep modes
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
||||
|
||||
# Enable UFS powersaving
|
||||
write /sys/devices/platform/soc/${ro.boot.bootdevice}/clkgate_enable 1
|
||||
write /sys/devices/platform/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 1
|
||||
|
||||
write /proc/sys/vm/swappiness 100
|
||||
write /proc/sys/vm/watermark_scale_factor 1
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
trigger enable-low-power
|
||||
|
||||
# If UART is on, enable console_suspend on boot_complete to save power
|
||||
on property:sys.boot_completed=1 && property:init.svc.console=running
|
||||
write /sys/module/printk/parameters/console_suspend Y
|
||||
|
||||
on property:init.svc.recovery=running
|
||||
trigger enable-low-power
|
||||
|
|
@ -29,7 +29,6 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
#
|
||||
|
||||
import /vendor/etc/init/hw/init.qcom.power.rc
|
||||
import /vendor/etc/init/hw/init.qcom.usb.rc
|
||||
import /vendor/etc/init/hw/init.target.rc
|
||||
|
||||
|
|
@ -548,6 +547,13 @@ service qcom-sh /vendor/bin/init.qcom.sh
|
|||
group root system radio
|
||||
oneshot
|
||||
|
||||
service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
|
||||
class late_start
|
||||
user root
|
||||
group root system wakelock graphics
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh
|
||||
class late_start
|
||||
group wifi inet
|
||||
|
|
@ -560,6 +566,9 @@ service wifi-crda /vendor/bin/init.crda.sh
|
|||
disabled
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
start qcom-post-boot
|
||||
|
||||
on property:ro.vendor.ril.mbn_copy_completed=1
|
||||
write /data/vendor/radio/copy_complete 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue