PCI: mobiveil: Add callback function for interrupt initialization
The Mobiveil GPEX internal MSI/INTx controller is not implemented in all platforms in which the Mobiveil GPEX is integrated. Allow platforms to implement their specific interrupt initialization. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Andrew Murray <amurray@thegoodpenguin.co.uk>
This commit is contained in:
parent
03bdc38840
commit
ed620e9654
@ -499,7 +499,7 @@ static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mobiveil_pcie_interrupt_init(struct mobiveil_pcie *pcie)
|
static int mobiveil_pcie_integrated_interrupt_init(struct mobiveil_pcie *pcie)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = pcie->pdev;
|
struct platform_device *pdev = pcie->pdev;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
@ -539,6 +539,16 @@ static int mobiveil_pcie_interrupt_init(struct mobiveil_pcie *pcie)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mobiveil_pcie_interrupt_init(struct mobiveil_pcie *pcie)
|
||||||
|
{
|
||||||
|
struct mobiveil_root_port *rp = &pcie->rp;
|
||||||
|
|
||||||
|
if (rp->ops->interrupt_init)
|
||||||
|
return rp->ops->interrupt_init(pcie);
|
||||||
|
|
||||||
|
return mobiveil_pcie_integrated_interrupt_init(pcie);
|
||||||
|
}
|
||||||
|
|
||||||
int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie)
|
int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie)
|
||||||
{
|
{
|
||||||
struct mobiveil_root_port *rp = &pcie->rp;
|
struct mobiveil_root_port *rp = &pcie->rp;
|
||||||
|
@ -130,10 +130,17 @@ struct mobiveil_msi { /* MSI information */
|
|||||||
DECLARE_BITMAP(msi_irq_in_use, PCI_NUM_MSI);
|
DECLARE_BITMAP(msi_irq_in_use, PCI_NUM_MSI);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct mobiveil_pcie;
|
||||||
|
|
||||||
|
struct mobiveil_rp_ops {
|
||||||
|
int (*interrupt_init)(struct mobiveil_pcie *pcie);
|
||||||
|
};
|
||||||
|
|
||||||
struct mobiveil_root_port {
|
struct mobiveil_root_port {
|
||||||
char root_bus_nr;
|
char root_bus_nr;
|
||||||
void __iomem *config_axi_slave_base; /* endpoint config base */
|
void __iomem *config_axi_slave_base; /* endpoint config base */
|
||||||
struct resource *ob_io_res;
|
struct resource *ob_io_res;
|
||||||
|
struct mobiveil_rp_ops *ops;
|
||||||
int irq;
|
int irq;
|
||||||
raw_spinlock_t intx_mask_lock;
|
raw_spinlock_t intx_mask_lock;
|
||||||
struct irq_domain *intx_domain;
|
struct irq_domain *intx_domain;
|
||||||
|
Loading…
Reference in New Issue
Block a user