Loading drivers/bus/mhi/core/mhi_boot.c +12 −7 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ int mhi_download_rddm_img(struct mhi_controller *mhi_cntrl, bool in_panic) } EXPORT_SYMBOL(mhi_download_rddm_img); static int mhi_fw_load_amss(struct mhi_controller *mhi_cntrl, static int mhi_fw_load_bhie(struct mhi_controller *mhi_cntrl, const struct mhi_buf *mhi_buf) { void __iomem *base = mhi_cntrl->bhie; Loading Loading @@ -355,7 +355,7 @@ static int mhi_fw_load_amss(struct mhi_controller *mhi_cntrl, return (tx_status == BHIE_TXVECSTATUS_STATUS_XFER_COMPL) ? 0 : -EIO; } static int mhi_fw_load_sbl(struct mhi_controller *mhi_cntrl, static int mhi_fw_load_bhi(struct mhi_controller *mhi_cntrl, dma_addr_t dma_addr, size_t size) { Loading Loading @@ -601,16 +601,21 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) return; } /* load sbl image */ /* load sbl or edl image via BHI */ memcpy(buf, firmware->data, size); ret = mhi_fw_load_sbl(mhi_cntrl, dma_addr, size); ret = mhi_fw_load_bhi(mhi_cntrl, dma_addr, size); mhi_free_coherent(mhi_cntrl, size, buf, dma_addr); if (!mhi_cntrl->fbc_download || ret || mhi_cntrl->ee == MHI_EE_EDL) release_firmware(firmware); /* error or in edl, we're done */ if (ret || mhi_cntrl->ee == MHI_EE_EDL) if (ret) { MHI_CNTRL_ERR("MHI did not load SBL/EDL image, ret:%d\n", ret); return; } /* we are done with FW load is EE is EDL */ if (mhi_cntrl->ee == MHI_EE_EDL) return; write_lock_irq(&mhi_cntrl->pm_lock); Loading Loading @@ -665,7 +670,7 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) /* start full firmware image download */ image_info = mhi_cntrl->fbc_image; ret = mhi_fw_load_amss(mhi_cntrl, ret = mhi_fw_load_bhie(mhi_cntrl, /* last entry is vec table */ &image_info->mhi_buf[image_info->entries - 1]); Loading Loading
drivers/bus/mhi/core/mhi_boot.c +12 −7 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ int mhi_download_rddm_img(struct mhi_controller *mhi_cntrl, bool in_panic) } EXPORT_SYMBOL(mhi_download_rddm_img); static int mhi_fw_load_amss(struct mhi_controller *mhi_cntrl, static int mhi_fw_load_bhie(struct mhi_controller *mhi_cntrl, const struct mhi_buf *mhi_buf) { void __iomem *base = mhi_cntrl->bhie; Loading Loading @@ -355,7 +355,7 @@ static int mhi_fw_load_amss(struct mhi_controller *mhi_cntrl, return (tx_status == BHIE_TXVECSTATUS_STATUS_XFER_COMPL) ? 0 : -EIO; } static int mhi_fw_load_sbl(struct mhi_controller *mhi_cntrl, static int mhi_fw_load_bhi(struct mhi_controller *mhi_cntrl, dma_addr_t dma_addr, size_t size) { Loading Loading @@ -601,16 +601,21 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) return; } /* load sbl image */ /* load sbl or edl image via BHI */ memcpy(buf, firmware->data, size); ret = mhi_fw_load_sbl(mhi_cntrl, dma_addr, size); ret = mhi_fw_load_bhi(mhi_cntrl, dma_addr, size); mhi_free_coherent(mhi_cntrl, size, buf, dma_addr); if (!mhi_cntrl->fbc_download || ret || mhi_cntrl->ee == MHI_EE_EDL) release_firmware(firmware); /* error or in edl, we're done */ if (ret || mhi_cntrl->ee == MHI_EE_EDL) if (ret) { MHI_CNTRL_ERR("MHI did not load SBL/EDL image, ret:%d\n", ret); return; } /* we are done with FW load is EE is EDL */ if (mhi_cntrl->ee == MHI_EE_EDL) return; write_lock_irq(&mhi_cntrl->pm_lock); Loading Loading @@ -665,7 +670,7 @@ void mhi_fw_load_handler(struct mhi_controller *mhi_cntrl) /* start full firmware image download */ image_info = mhi_cntrl->fbc_image; ret = mhi_fw_load_amss(mhi_cntrl, ret = mhi_fw_load_bhie(mhi_cntrl, /* last entry is vec table */ &image_info->mhi_buf[image_info->entries - 1]); Loading