Skip to content

Commit 5fbfae6

Browse files
Mani-Sadhasivamkwilczynski
authored andcommitted
PCI: qcom-ep: Mask PTM_UPDATING interrupt
When PTM is enabled, PTM_UPDATING interrupt will be fired for each PTM context update, which will be once every 10ms in the case of auto context update. Since the interrupt is not strictly needed for making use of PTM, mask it to avoid the overhead of processing it. Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 852a1fd commit 5fbfae6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#define PARF_DEVICE_TYPE 0x1000
6161
#define PARF_BDF_TO_SID_CFG 0x2c00
6262
#define PARF_INT_ALL_5_MASK 0x2dcc
63+
#define PARF_INT_ALL_3_MASK 0x2e18
6364

6465
/* PARF_INT_ALL_{STATUS/CLEAR/MASK} register fields */
6566
#define PARF_INT_ALL_LINK_DOWN BIT(1)
@@ -132,6 +133,9 @@
132133
/* PARF_INT_ALL_5_MASK fields */
133134
#define PARF_INT_ALL_5_MHI_RAM_DATA_PARITY_ERR BIT(0)
134135

136+
/* PARF_INT_ALL_3_MASK fields */
137+
#define PARF_INT_ALL_3_PTM_UPDATING BIT(4)
138+
135139
/* ELBI registers */
136140
#define ELBI_SYS_STTS 0x08
137141
#define ELBI_CS2_ENABLE 0xa4
@@ -497,6 +501,10 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
497501
writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_5_MASK);
498502
}
499503

504+
val = readl_relaxed(pcie_ep->parf + PARF_INT_ALL_3_MASK);
505+
val &= ~PARF_INT_ALL_3_PTM_UPDATING;
506+
writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_3_MASK);
507+
500508
ret = dw_pcie_ep_init_registers(&pcie_ep->pci.ep);
501509
if (ret) {
502510
dev_err(dev, "Failed to complete initialization: %d\n", ret);

0 commit comments

Comments
 (0)