Skip to content

Commit ff8d920

Browse files
Mani-Sadhasivamkwilczynski
authored andcommitted
PCI: qcom-ep: Add eDMA support
Qualcomm PCIe Endpoint controllers have the in-built Embedded DMA (eDMA) peripheral for offloading the data transfer between the PCIe bus and memory. Let's add support for it by enabling the eDMA IRQ in the driver. The eDMA DMA Engine driver will handle the rest of the functionality. Since the eDMA on Qualcomm platforms only uses a single IRQ for all channels, use 1 for edma.nr_irqs. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230717065459.14138-4-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
1 parent d9d9f26 commit ff8d920

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
#define PARF_INT_ALL_PLS_ERR BIT(15)
7575
#define PARF_INT_ALL_PME_LEGACY BIT(16)
7676
#define PARF_INT_ALL_PLS_PME BIT(17)
77+
#define PARF_INT_ALL_EDMA BIT(22)
7778

7879
/* PARF_BDF_TO_SID_CFG register fields */
7980
#define PARF_BDF_TO_SID_BYPASS BIT(0)
@@ -395,7 +396,7 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
395396
writel_relaxed(0, pcie_ep->parf + PARF_INT_ALL_MASK);
396397
val = PARF_INT_ALL_LINK_DOWN | PARF_INT_ALL_BME |
397398
PARF_INT_ALL_PM_TURNOFF | PARF_INT_ALL_DSTATE_CHANGE |
398-
PARF_INT_ALL_LINK_UP;
399+
PARF_INT_ALL_LINK_UP | PARF_INT_ALL_EDMA;
399400
writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_MASK);
400401

401402
ret = dw_pcie_ep_init_complete(&pcie_ep->pci.ep);
@@ -744,6 +745,7 @@ static int qcom_pcie_ep_probe(struct platform_device *pdev)
744745
pcie_ep->pci.dev = dev;
745746
pcie_ep->pci.ops = &pci_ops;
746747
pcie_ep->pci.ep.ops = &pci_ep_ops;
748+
pcie_ep->pci.edma.nr_irqs = 1;
747749
platform_set_drvdata(pdev, pcie_ep);
748750

749751
ret = qcom_pcie_ep_get_resources(pdev, pcie_ep);

0 commit comments

Comments
 (0)