remoteproc: pas: Clear master kernel if D request fails

Clear the master kernel bit if the SOCCP does not honour the
APPS request for a state change.

Change-Id: I5a6747973ed87e4c7f0d9074ef8da56925d2a927
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
This commit is contained in:
Gokul krishna Krishnakumar 2024-06-25 13:06:07 -07:00 committed by Kamati Srinivas
parent b8fcfd2679
commit 1bb038ef63

View File

@ -972,6 +972,12 @@ int rproc_set_state(struct rproc *rproc, bool state)
ret = rproc_config_check(adsp, SOCCP_D0);
if (ret) {
ret = qcom_smem_state_update_bits(adsp->wake_state,
SOCCP_STATE_MASK,
!BIT(adsp->wake_bit));
if (ret)
dev_err(adsp->dev, "failed to clear smem bits after a failed D0 request\n");
dsb(sy);
dev_err(adsp->dev, "%s requested D3->D0: soccp failed to update tcsr val=%d\n",
current->comm, readl(adsp->config_addr));
@ -995,6 +1001,12 @@ int rproc_set_state(struct rproc *rproc, bool state)
ret = rproc_config_check(adsp, SOCCP_D3);
if (ret) {
ret = qcom_smem_state_update_bits(adsp->sleep_state,
SOCCP_STATE_MASK,
!BIT(adsp->sleep_bit));
if (ret)
dev_err(adsp->dev, "failed to clear smem bits after a failed D3 request\n");
dsb(sy);
dev_err(adsp->dev, "%s requested D0->D3 failed: TCSR value:%d\n",
current->comm, readl(adsp->config_addr));