Skip to content

Commit 66861c5

Browse files
Vidya Sagarbjorn-helgaas
authored andcommitted
PCI: tegra194: Enable DMA interrupt
Enable DMA interrupt to support Tegra PCIe DMA in both Root Port and Endpoint modes. Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Link: https://patch.msgid.link/20260324191000.1095768-5-mmaddireddy@nvidia.com
1 parent 323a6e3 commit 66861c5

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
#define APPL_INTR_EN_L1_8_0 0x44
9292
#define APPL_INTR_EN_L1_8_BW_MGT_INT_EN BIT(2)
9393
#define APPL_INTR_EN_L1_8_AUTO_BW_INT_EN BIT(3)
94+
#define APPL_INTR_EN_L1_8_EDMA_INT_EN BIT(6)
9495
#define APPL_INTR_EN_L1_8_INTX_EN BIT(11)
9596
#define APPL_INTR_EN_L1_8_AER_INT_EN BIT(15)
9697

@@ -544,6 +545,17 @@ static irqreturn_t tegra_pcie_ep_hard_irq(int irq, void *arg)
544545
spurious = 0;
545546
}
546547

548+
if (status_l0 & APPL_INTR_STATUS_L0_INT_INT) {
549+
status_l1 = appl_readl(pcie, APPL_INTR_STATUS_L1_8_0);
550+
551+
/*
552+
* Interrupt is handled by DMA driver; don't treat it as
553+
* spurious
554+
*/
555+
if (status_l1 & APPL_INTR_STATUS_L1_8_0_EDMA_INT_MASK)
556+
spurious = 0;
557+
}
558+
547559
if (spurious) {
548560
dev_warn(pcie->dev, "Random interrupt (STATUS = 0x%08X)\n",
549561
status_l0);
@@ -780,6 +792,7 @@ static void tegra_pcie_enable_intx_interrupts(struct dw_pcie_rp *pp)
780792
val |= APPL_INTR_EN_L1_8_INTX_EN;
781793
val |= APPL_INTR_EN_L1_8_AUTO_BW_INT_EN;
782794
val |= APPL_INTR_EN_L1_8_BW_MGT_INT_EN;
795+
val |= APPL_INTR_EN_L1_8_EDMA_INT_EN;
783796
if (IS_ENABLED(CONFIG_PCIEAER))
784797
val |= APPL_INTR_EN_L1_8_AER_INT_EN;
785798
appl_writel(pcie, val, APPL_INTR_EN_L1_8_0);
@@ -1806,13 +1819,18 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)
18061819
val |= APPL_INTR_EN_L0_0_SYS_INTR_EN;
18071820
val |= APPL_INTR_EN_L0_0_LINK_STATE_INT_EN;
18081821
val |= APPL_INTR_EN_L0_0_PCI_CMD_EN_INT_EN;
1822+
val |= APPL_INTR_EN_L0_0_INT_INT_EN;
18091823
appl_writel(pcie, val, APPL_INTR_EN_L0_0);
18101824

18111825
val = appl_readl(pcie, APPL_INTR_EN_L1_0_0);
18121826
val |= APPL_INTR_EN_L1_0_0_HOT_RESET_DONE_INT_EN;
18131827
val |= APPL_INTR_EN_L1_0_0_RDLH_LINK_UP_INT_EN;
18141828
appl_writel(pcie, val, APPL_INTR_EN_L1_0_0);
18151829

1830+
val = appl_readl(pcie, APPL_INTR_EN_L1_8_0);
1831+
val |= APPL_INTR_EN_L1_8_EDMA_INT_EN;
1832+
appl_writel(pcie, val, APPL_INTR_EN_L1_8_0);
1833+
18161834
/* 110us for both snoop and no-snoop */
18171835
val = FIELD_PREP(PCI_LTR_VALUE_MASK, 110) |
18181836
FIELD_PREP(PCI_LTR_SCALE_MASK, 2) |

0 commit comments

Comments
 (0)