PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently
No functional change. Split dra7xx_pcie_enable_interrupts() into dra7xx_pcie_enable_wrapper_interrupts() and dra7xx_pcie_enable_msi_interrupts() so that wrapper interrupts and MSI interrupts can be enabled independently. This is in preparation for adding EP mode support to dra7xx driver since EP mode doesn't have to enable msi_interrupts. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
b12befecd7
commit
5ffd90a035
@ -140,16 +140,28 @@ static int dra7xx_pcie_establish_link(struct dra7xx_pcie *dra7xx)
|
|||||||
return dw_pcie_wait_for_link(pci);
|
return dw_pcie_wait_for_link(pci);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dra7xx_pcie_enable_interrupts(struct dra7xx_pcie *dra7xx)
|
static void dra7xx_pcie_enable_msi_interrupts(struct dra7xx_pcie *dra7xx)
|
||||||
|
{
|
||||||
|
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MSI,
|
||||||
|
~LEG_EP_INTERRUPTS & ~MSI);
|
||||||
|
|
||||||
|
dra7xx_pcie_writel(dra7xx,
|
||||||
|
PCIECTRL_DRA7XX_CONF_IRQENABLE_SET_MSI,
|
||||||
|
MSI | LEG_EP_INTERRUPTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dra7xx_pcie_enable_wrapper_interrupts(struct dra7xx_pcie *dra7xx)
|
||||||
{
|
{
|
||||||
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN,
|
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN,
|
||||||
~INTERRUPTS);
|
~INTERRUPTS);
|
||||||
dra7xx_pcie_writel(dra7xx,
|
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQENABLE_SET_MAIN,
|
||||||
PCIECTRL_DRA7XX_CONF_IRQENABLE_SET_MAIN, INTERRUPTS);
|
INTERRUPTS);
|
||||||
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MSI,
|
}
|
||||||
~LEG_EP_INTERRUPTS & ~MSI);
|
|
||||||
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_IRQENABLE_SET_MSI,
|
static void dra7xx_pcie_enable_interrupts(struct dra7xx_pcie *dra7xx)
|
||||||
MSI | LEG_EP_INTERRUPTS);
|
{
|
||||||
|
dra7xx_pcie_enable_wrapper_interrupts(dra7xx);
|
||||||
|
dra7xx_pcie_enable_msi_interrupts(dra7xx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dra7xx_pcie_host_init(struct pcie_port *pp)
|
static void dra7xx_pcie_host_init(struct pcie_port *pp)
|
||||||
|
Loading…
Reference in New Issue
Block a user