mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
mhi: core: Skip RDDM download if execution env is unknown
If mhi_get_exec_env API returns MHI_EE_MAX skip RDDM download. API returns this value if BHI offset read failed or BHI_EXECENV register read fails. This indicates the underlying transport is unresponsive so there is no need to trigger RDDM using SYSERR or request SOC reset. Change-Id: I0cc85af84f19b425c94fe8aea987ab03af6de032 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
6e8d77cd33
commit
c61705f68b
1 changed files with 7 additions and 2 deletions
|
|
@ -217,6 +217,9 @@ static int __mhi_download_rddm_in_panic(struct mhi_controller *mhi_cntrl)
|
|||
* waiting for image download completion.
|
||||
*/
|
||||
ee = mhi_get_exec_env(mhi_cntrl);
|
||||
if (ee == MHI_EE_MAX)
|
||||
goto err_no_rddm;
|
||||
|
||||
if (ee != MHI_EE_RDDM) {
|
||||
|
||||
MHI_CNTRL_LOG("Trigger device into RDDM mode using SYSERR\n");
|
||||
|
|
@ -265,10 +268,12 @@ static int __mhi_download_rddm_in_panic(struct mhi_controller *mhi_cntrl)
|
|||
ee = mhi_get_exec_env(mhi_cntrl);
|
||||
ret = mhi_read_reg(mhi_cntrl, base, BHIE_RXVECSTATUS_OFFS, &rx_status);
|
||||
|
||||
MHI_CNTRL_ERR("Did not complete RDDM transfer\n");
|
||||
MHI_CNTRL_ERR("Current EE:%s\n", TO_MHI_EXEC_STR(ee));
|
||||
MHI_CNTRL_ERR("RXVEC_STATUS:0x%x, ret:%d\n", rx_status, ret);
|
||||
|
||||
err_no_rddm:
|
||||
MHI_CNTRL_ERR("Current EE:%s\n", TO_MHI_EXEC_STR(ee));
|
||||
MHI_CNTRL_ERR("Did not complete RDDM transfer\n");
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue