summaryrefslogtreecommitdiff
path: root/drivers/bus/mhi/host/boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bus/mhi/host/boot.c')
-rw-r--r--drivers/bus/mhi/host/boot.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/bus/mhi/host/boot.c b/drivers/bus/mhi/host/boot.c
index 205d83ac069f..c76db35bc29a 100644
--- a/drivers/bus/mhi/host/boot.c
+++ b/drivers/bus/mhi/host/boot.c
@@ -584,6 +584,16 @@ skip_req_fw:
* device transitioning into MHI READY state
*/
if (fw_load_type == MHI_FW_LOAD_FBC) {
+ /*
+ * Some FW combine two separate ELF images (SBL + WLAN FW) in a single
+ * file. Hence, check for the existence of the second ELF header after
+ * SBL. If present, load the second image separately.
+ */
+ if (!memcmp(fw_data + mhi_cntrl->sbl_size, ELFMAG, SELFMAG)) {
+ fw_data += mhi_cntrl->sbl_size;
+ fw_sz -= mhi_cntrl->sbl_size;
+ }
+
ret = mhi_alloc_bhie_table(mhi_cntrl, &mhi_cntrl->fbc_image, fw_sz);
if (ret) {
release_firmware(firmware);