init.common.rc: boost UFS during boot

Before:
SystemServer_start            : 6.5916  0.14159
SystemUi_start                : 9.646   0.11627
system_server_ready           : 10.341  0.16571

After:
SystemServer_start            : 6.5465  0.17295
SystemUi_start                : 9.5017  0.13355
system_server_ready           : 10.13   0.17956

Bug: 63644084
Test: 10 boot with packages/services/Car/tools/bootanalyze/bootanalyze.py
Change-Id: I5509629bba6cddb35bb72d0f48283e2bf51cebd3
diff --git a/init.common.rc b/init.common.rc
index 142beec..2035fd8 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -13,6 +13,11 @@
     chmod 0755 /sys/kernel/debug
 
 on init
+    # Disable UFS powersaving
+    write /sys/devices/soc/624000.ufshc/clkscale_enable 0
+    write /sys/devices/soc/624000.ufshc/clkgate_enable 0
+    write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 0
+
     # We have vendor/ as early mount so we can start qseecomd earlier
     # early mount partions e.g. vendor/ will be mounted in init first stage
     # see b/27805372
@@ -744,6 +749,11 @@
     keycodes 114 115 116
 
 on property:sys.boot_completed=1
+    # Enable UFS powersaving
+    write /sys/devices/soc/624000.ufshc/clkscale_enable 1
+    write /sys/devices/soc/624000.ufshc/clkgate_enable 1
+    write /sys/devices/soc/624000.ufshc/624000.ufshc:ufs_variant/pm_qos_enable 1
+
     # Enable ZRAM on boot_complete
     swapon_all /vendor/etc/fstab.${ro.hardware}