From 3ba9fbc3d65fd7fb48412288d40f1ac9efc8ed19 Mon Sep 17 00:00:00 2001 From: Ziqi Chen Date: Wed, 9 Jun 2021 11:01:59 +0800 Subject: [PATCH] sm8350-common: rootdir: 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 --- rootdir/etc/init.qcom.rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 0d382fc..368e06c 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -34,6 +34,10 @@ on early-init # Disable UFS clock scaling 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 on early-boot write /sys/class/drm/card0-DSI-1/status "detect" @@ -237,6 +241,10 @@ on property:persist.vendor.qcomsysd.enabled=0 on property:sys.boot_completed=1 # Enable UFS clock scaling back 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 chown media audio /sys/kernel/wdsp0/boot