summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhaumik Bhatt <bbhatt@codeaurora.org>2021-02-10 18:17:13 -0800
committerLoic Poulain <loic.poulain@linaro.org>2021-03-01 16:49:09 +0100
commitfdef7639beff7c8244916988aff50a6f8e1992e0 (patch)
treedc23dd4478000f2e5f65f45a9987aa5df9e9fc20
parent945ad75b91586bd6d738a32c95067023fc7ceb76 (diff)
bus: mhi: core: Wait for ready after an EDL firmware download
Currently, the firmware load handler returns after the EDL image is downloaded. Wait for an MHI READY transition instead as the specification expects so as to proceed with further bootup such as device entering Flash Programmer execution environment. Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
-rw-r--r--drivers/bus/mhi/core/boot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/bus/mhi/core/boot.c b/drivers/bus/mhi/core/boot.c
index 2a604d62b576..2610cc16c327 100644
--- a/drivers/bus/mhi/core/boot.c
+++ b/drivers/bus/mhi/core/boot.c
@@ -418,7 +418,7 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl)
/* If device is in pass through, do reset to ready state transition */
if (mhi_cntrl->ee == MHI_EE_PTHRU)
- goto fw_load_ee_pthru;
+ goto fw_load_ready_state;
fw_name = (mhi_cntrl->ee == MHI_EE_EDL) ?
mhi_cntrl->edl_image : mhi_cntrl->fw_image;
@@ -463,7 +463,7 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl)
/* Exit if EDL image was loaded */
if (fw_name == mhi_cntrl->edl_image) {
release_firmware(firmware);
- return;
+ goto fw_load_ready_state;
}
write_lock_irq(&mhi_cntrl->pm_lock);
@@ -488,7 +488,7 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl)
release_firmware(firmware);
-fw_load_ee_pthru:
+fw_load_ready_state:
/* Transitioning into MHI RESET->READY state */
ret = mhi_ready_state_transition(mhi_cntrl);