init.qcom.rc: Tuning UFS clkgate and ah8 during boot time

Disabling UFS clkgate and ah8 during boot time helps in reducing
IO delays, which helps in reducing the total boot time. This change
will disable UFS clkgate and ah8 during early-init and then enable
it back after boot completion.

Change-Id: I6a10cd57a30fe3bdc4fba72a0d84cdfa3b1fd513
This commit is contained in:
Ziqi Chen 2021-06-09 11:01:59 +08:00 committed by Omkar Chandorkar
parent d8d9237220
commit 38fc8d04c8
1 changed files with 8 additions and 0 deletions

View File

@ -58,6 +58,10 @@ on early-init
#Disable UFS clock scaling #Disable UFS clock scaling
write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 0 write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 0
#Disable UFS auto_hibern8
write /sys/bus/platform/devices/1d84000.ufshc/auto_hibern8 0
#Disable UFS clock gating
write /sys/bus/platform/devices/1d84000.ufshc/clkgate_enable 0
chown root system /dev/kmsg chown root system /dev/kmsg
chmod 0620 /dev/kmsg chmod 0620 /dev/kmsg
@ -469,6 +473,10 @@ on property:sys.boot_completed=1
write /dev/kmsg "Boot completed " write /dev/kmsg "Boot completed "
#Enable UFS clock scaling back #Enable UFS clock scaling back
write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 1 write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 1
#Enable UFS auto_hibern8 back
write /sys/bus/platform/devices/1d84000.ufshc/auto_hibern8 5000
#Enable UFS clock gating back
write /sys/bus/platform/devices/1d84000.ufshc/clkgate_enable 1
#WDSP FW boot sysfs node used by STHAL #WDSP FW boot sysfs node used by STHAL
chown media audio /sys/kernel/wdsp0/boot chown media audio /sys/kernel/wdsp0/boot
chown media audio /sys/kernel/wcd_cpe0/fw_name chown media audio /sys/kernel/wcd_cpe0/fw_name