mhi: host: Skip MHI reset if device is in RDDM

In RDDM EE, device can not process MHI reset
issued by host. In case of MHI power off, host
is issuing MHI reset and polls for it to get
cleared until it times out. Since this timeout
can not be avoided in case of RDDM, skip the
MHI reset in this scenarios.

Change-Id: Ide4311ba8705861179bfbfef650f00fa0f97c062
Signed-off-by: Hemant Kumar <quic_hemantk@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit is contained in:
Hemant Kumar 2022-06-15 16:01:20 -07:00 committed by Gerrit - the friendly Code Review server
parent 8407d797f0
commit 5a1870bb6b

View File

@ -473,8 +473,13 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl)
mutex_lock(&mhi_cntrl->pm_mutex);
/* Trigger MHI RESET so that the device will not access host memory */
if (!MHI_PM_IN_FATAL_STATE(mhi_cntrl->pm_state)) {
/*
* Trigger MHI RESET so that the device will not access host memory.
* skip MHI reset if device is in RDDM.
*/
if ((!MHI_PM_IN_FATAL_STATE(mhi_cntrl->pm_state)) &&
(mhi_cntrl->rddm_image &&
mhi_get_exec_env(mhi_cntrl) != MHI_EE_RDDM)) {
dev_dbg(dev, "Triggering MHI Reset in device\n");
mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET);