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-02-17 18:17:58 +0100
commite49947ef499b28c5d5a4d09bfce1962b0a79be38 (patch)
tree8e6593a7c573206bc1bf2daab57c6669ed66f726
parent8ab36451b25c43e6e76aaeafbd2bbe408b98a835 (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);