Skip to content

Commit 62df57b

Browse files
mindachen1987bjorn-helgaas
authored andcommitted
PCI: microchip: Add INTx and MSI event num to struct plda_event
The INTx and MSI interrupt event num is different across platforms, so add two event num fields in struct plda_event. Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Minda Chen <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Conor Dooley <[email protected]>
1 parent 6476904 commit 62df57b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/pci/controller/plda/pcie-microchip-host.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,8 @@ static int mc_request_event_irq(struct plda_pcie_rp *plda, int event_irq,
817817

818818
static const struct plda_event mc_event = {
819819
.request_event_irq = mc_request_event_irq,
820+
.intx_event = EVENT_LOCAL_PM_MSI_INT_INTX,
821+
.msi_event = EVENT_LOCAL_PM_MSI_INT_MSI,
820822
};
821823

822824
static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port)
@@ -960,7 +962,7 @@ static int plda_init_interrupts(struct platform_device *pdev,
960962
}
961963

962964
intx_irq = irq_create_mapping(port->event_domain,
963-
EVENT_LOCAL_PM_MSI_INT_INTX);
965+
event->intx_event);
964966
if (!intx_irq) {
965967
dev_err(dev, "failed to map INTx interrupt\n");
966968
return -ENXIO;
@@ -970,7 +972,7 @@ static int plda_init_interrupts(struct platform_device *pdev,
970972
irq_set_chained_handler_and_data(intx_irq, plda_handle_intx, port);
971973

972974
msi_irq = irq_create_mapping(port->event_domain,
973-
EVENT_LOCAL_PM_MSI_INT_MSI);
975+
event->msi_event);
974976
if (!msi_irq)
975977
return -ENXIO;
976978

drivers/pci/controller/plda/pcie-plda.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ struct plda_pcie_rp {
130130
struct plda_event {
131131
int (*request_event_irq)(struct plda_pcie_rp *pcie,
132132
int event_irq, int event);
133+
int intx_event;
134+
int msi_event;
133135
};
134136

135137
void plda_pcie_setup_window(void __iomem *bridge_base_addr, u32 index,

0 commit comments

Comments
 (0)