summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2023-11-27 14:06:24 +0300
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2023-12-14 09:28:53 +0300
commitd1c6f4ba4746ed41fde8269cb5fea88bddb60504 (patch)
treea41d6e920f5b54d6d0e768b034607551cb0333fc
parent0d5d5738dc206e531d3a70c6a81fde4e9fa40b5d (diff)
downloadlinux-d1c6f4ba4746ed41fde8269cb5fea88bddb60504.tar.xz
PCI: epf-mhi: Enable MHI async read/write support
Now that both eDMA and iATU are prepared to support async transfer, let's enable MHI async read/write by supplying the relevant callbacks. In the absence of eDMA, iATU will be used for both sync and async operations. Acked-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Krzysztof WilczyƄski <kw@linux.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-rw-r--r--drivers/pci/endpoint/functions/pci-epf-mhi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index 596fd205a314..472bc489b754 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -766,12 +766,13 @@ static int pci_epf_mhi_link_up(struct pci_epf *epf)
mhi_cntrl->raise_irq = pci_epf_mhi_raise_irq;
mhi_cntrl->alloc_map = pci_epf_mhi_alloc_map;
mhi_cntrl->unmap_free = pci_epf_mhi_unmap_free;
+ mhi_cntrl->read_sync = mhi_cntrl->read_async = pci_epf_mhi_iatu_read;
+ mhi_cntrl->write_sync = mhi_cntrl->write_async = pci_epf_mhi_iatu_write;
if (info->flags & MHI_EPF_USE_DMA) {
mhi_cntrl->read_sync = pci_epf_mhi_edma_read;
mhi_cntrl->write_sync = pci_epf_mhi_edma_write;
- } else {
- mhi_cntrl->read_sync = pci_epf_mhi_iatu_read;
- mhi_cntrl->write_sync = pci_epf_mhi_iatu_write;
+ mhi_cntrl->read_async = pci_epf_mhi_edma_read_async;
+ mhi_cntrl->write_async = pci_epf_mhi_edma_write_async;
}
/* Register the MHI EP controller */