diff mbox series

[v2,2/5] PCI: dwc: add doorbell support by use MSI controller

Message ID 20230911220920.1817033-3-Frank.Li@nxp.com (mailing list archive)
State Changes Requested
Delegated to: Manivannan Sadhasivam
Headers show
Series Add RC-to-EP doorbell with platform MSI controller | expand

Commit Message

Frank Li Sept. 11, 2023, 10:09 p.m. UTC
Call pci_epc_generic_alloc_doorbell() to alloc an platform MSI address
space.The Endpoint (EP) function drver can maps the memory assigned for the
BAR region by the PCI host to the message address of the platform MSI
interrupt controller in the PCI EP. As a result, when the PCI RC writes to
the BAR region, it triggers an IRQ at the EP.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/pci/controller/dwc/pcie-designware-ep.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index f9182f8d552f4..4f6be5f4ba18a 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -477,6 +477,8 @@  static const struct pci_epc_ops epc_ops = {
 	.start			= dw_pcie_ep_start,
 	.stop			= dw_pcie_ep_stop,
 	.get_features		= dw_pcie_ep_get_features,
+	.alloc_doorbell		= pci_epc_generic_alloc_doorbell,
+	.free_doorbell		= pci_epc_generic_free_doorbell,
 };
 
 int dw_pcie_ep_raise_legacy_irq(struct dw_pcie_ep *ep, u8 func_no)