summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhaumik Bhatt <bbhatt@codeaurora.org>2021-02-10 18:17:12 -0800
committerLoic Poulain <loic.poulain@linaro.org>2021-02-17 17:58:59 +0100
commit8ab36451b25c43e6e76aaeafbd2bbe408b98a835 (patch)
tree44c9531210d7debb7911b21f7c7f21f63e94ebf7
parent5af7ceca605204b31ffde4d95d1f2b1bde72970b (diff)
bus: mhi: core: Rely on accurate method to determine EDL mode
Relying on the current execution environment to determine if EDL image was downloaded should not be done as the execution environment can change at this point in error cases and we may misread it. Instead, MHI can rely on the local 'fw_name' variable as a safer alternative. Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
-rw-r--r--drivers/bus/mhi/core/boot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bus/mhi/core/boot.c b/drivers/bus/mhi/core/boot.c
index b91c7b397288..2a604d62b576 100644
--- a/drivers/bus/mhi/core/boot.c
+++ b/drivers/bus/mhi/core/boot.c
@@ -460,7 +460,8 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl)
goto error_fw_load;
}
- if (mhi_cntrl->ee == MHI_EE_EDL) {
+ /* Exit if EDL image was loaded */
+ if (fw_name == mhi_cntrl->edl_image) {
release_firmware(firmware);
return;
}