vendor: init: Disable cdsp daemon if cdsp defective

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

Change-Id: Ic97aac8bf1c9fc392f96f9bb94e6f5097ce12700
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
This commit is contained in:
Vamsi Krishna Gattupalli 2023-03-07 10:56:52 +05:30 committed by chrisl7
parent 454103512e
commit b4c372fc66
1 changed files with 28 additions and 0 deletions

View File

@ -856,6 +856,34 @@ function start_hbtp()
fi
}
case "$target" in
"kalama")
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
"0x7f")
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")