msm: mhi_dev: Moving the edma init to mmio init
Edma alloc channels should be done only after edma init which is done in ep pcie core. Some times ep pcie core edma init is delaying that is causing the mhi_dev_probe failure, so moving edma part to mmio init. Change-Id: I2f61255b02967040238fda875c1e8038c234c698 Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
This commit is contained in:
parent
bd439b2bf0
commit
968ead0c9e
@ -4080,6 +4080,20 @@ static int mhi_init(struct mhi_dev *mhi)
|
||||
int rc = 0, i = 0;
|
||||
struct platform_device *pdev = mhi->pdev;
|
||||
|
||||
if (mhi_ctx->use_edma) {
|
||||
rc = mhi_edma_init(&pdev->dev);
|
||||
if (rc) {
|
||||
pr_err("MHI: mhi edma init failed, rc = %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (rc) {
|
||||
pr_err("Error set MHI DMA mask: rc = %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
rc = mhi_dev_mmio_init(mhi);
|
||||
if (rc) {
|
||||
pr_err("Failed to update the MMIO init\n");
|
||||
@ -4475,20 +4489,6 @@ static int mhi_dev_probe(struct platform_device *pdev)
|
||||
mhi_update_state_info(MHI_STATE_CONFIGURED);
|
||||
}
|
||||
|
||||
if (mhi_ctx->use_edma) {
|
||||
rc = mhi_edma_init(&pdev->dev);
|
||||
if (rc) {
|
||||
pr_err("MHI: mhi edma init failed, rc = %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (rc) {
|
||||
pr_err("Error set MHI DMA mask: rc = %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
if (mhi_ctx->use_edma) {
|
||||
mhi_ctx->read_from_host = mhi_dev_read_from_host_edma;
|
||||
mhi_ctx->write_to_host = mhi_dev_write_to_host_edma;
|
||||
|
Loading…
Reference in New Issue
Block a user