Commit 9f67437b authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Lorenzo Pieralisi

PCI: dwc: Add support to use non default msi_irq_chip

Platforms using DesignWare IP use dw_pci_msi_bottom_irq_chip for
configuring the MSI controller logic within the DesignWare IP. However
certain platforms like Keystone (K2G) which uses DesignWare IP have
their own MSI controller logic. For handling such platforms,
the irqchip ops use msi_irq_ack(), msi_set_irq(), msi_clear_irq()
callback functions.

Add support to use different msi_irq_chip with default set to
dw_pci_msi_bottom_irq_chip. This is in preparation to get rid of
msi_irq_ack(), msi_set_irq(), msi_clear_irq() and other Keystone
specific dw_pcie_host_ops.
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
parent 66c10eca
...@@ -245,7 +245,7 @@ static int dw_pcie_irq_domain_alloc(struct irq_domain *domain, ...@@ -245,7 +245,7 @@ static int dw_pcie_irq_domain_alloc(struct irq_domain *domain,
for (i = 0; i < nr_irqs; i++) for (i = 0; i < nr_irqs; i++)
irq_domain_set_info(domain, virq + i, bit + i, irq_domain_set_info(domain, virq + i, bit + i,
&dw_pci_msi_bottom_irq_chip, pp->msi_irq_chip,
pp, handle_edge_irq, pp, handle_edge_irq,
NULL, NULL); NULL, NULL);
...@@ -277,6 +277,9 @@ int dw_pcie_allocate_domains(struct pcie_port *pp) ...@@ -277,6 +277,9 @@ int dw_pcie_allocate_domains(struct pcie_port *pp)
struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
struct fwnode_handle *fwnode = of_node_to_fwnode(pci->dev->of_node); struct fwnode_handle *fwnode = of_node_to_fwnode(pci->dev->of_node);
if (!pp->msi_irq_chip)
pp->msi_irq_chip = &dw_pci_msi_bottom_irq_chip;
pp->irq_domain = irq_domain_create_linear(fwnode, pp->num_vectors, pp->irq_domain = irq_domain_create_linear(fwnode, pp->num_vectors,
&dw_pcie_msi_domain_ops, pp); &dw_pcie_msi_domain_ops, pp);
if (!pp->irq_domain) { if (!pp->irq_domain) {
......
...@@ -179,6 +179,7 @@ struct pcie_port { ...@@ -179,6 +179,7 @@ struct pcie_port {
struct irq_domain *irq_domain; struct irq_domain *irq_domain;
struct irq_domain *msi_domain; struct irq_domain *msi_domain;
dma_addr_t msi_data; dma_addr_t msi_data;
struct irq_chip *msi_irq_chip;
u32 num_vectors; u32 num_vectors;
u32 irq_mask[MAX_MSI_CTRLS]; u32 irq_mask[MAX_MSI_CTRLS];
raw_spinlock_t lock; raw_spinlock_t lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment