Browse Source

sm8450-common: rootdir: adsprpc: To disable cdsp daemon if NSP defective for parrot

To disable cdsp daemon by checking value of node
fastrpc_cdsp_status which is set after checking if
NSP is defective.

Acked-by: Ansa Ahmed <[email protected]>
Signed-off-by: Vamsi Krishna Gattupalli <[email protected]>
Change-Id: I8f197c46d6cedb64a58ae49d0a5120c8a78e533f
Vamsi Krishna Gattupalli 1 year ago
parent
commit
d5a07eccc6
1 changed files with 28 additions and 0 deletions
  1. 28 0
      rootdir/bin/init.qcom.post_boot.sh

+ 28 - 0
rootdir/bin/init.qcom.post_boot.sh

@@ -856,6 +856,34 @@ function start_hbtp()
         fi
 }
 
+case "$target" in
+        "parrot")
+                if [ -f /sys/devices/soc0/chip_family ]; then
+                        chip_family_id=`cat /sys/devices/soc0/chip_family`
+                else
+                        chip_family_id=-1
+                fi
+
+                echo "adsprpc : chip_family_id : $chip_faily_id" > /dev/kmsg
+
+                case "$chip_family_id" in
+                    "0x84")
+                    if [ -f /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status ]; then
+                        fastrpc_cdsp_status=`cat /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status`
+                    else
+                        fastrpc_cdsp_status=-1
+                    fi
+
+                    echo "adsprpc : fastrpc_cdsp_status : $fastrpc_cdsp_status" > /dev/kmsg
+
+                    if [ $fastrpc_cdsp_status -eq 0 ]; then
+                            setprop vendor.fastrpc.disable.cdsprpcd.daemon 1
+                            echo "adsprpc : Disabled cdsp daemon" > /dev/kmsg
+                    fi
+                esac
+                 ;;
+esac
+
 case "$target" in
     "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627a"  | "msm7627_surf" | \
     "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x")