mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
mhi: core: Use appropriate names for BHI/BHIe firmware load functions
mhi_fw_load_sbl() function is currently used to transfer SBL or EDL images over BHI (Boot Host Interface). Same goes with mhi_fw_load_amss() which uses BHIe. However, the contents do not indicate support for a specific set of images. Since these can be used for any image download over BHI or BHIe, we should rename them based on the protocol used. Change-Id: I108aec270c0ae915cae5e08710402962a723cf0f Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
parent
5e803bd9f5
commit
e4c3f82c3b
1 changed files with 12 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -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);
|
||||
|
|
@ -665,7 +670,7 @@ fw_load_ee_pthru:
|
|||
|
||||
/* 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…
Reference in a new issue