Skip to content

Commit 8101b27

Browse files
committed
Merge tag 'pci-v6.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci fixes from Bjorn Helgaas: - Add Manivannan Sadhasivam as PCI native host bridge and endpoint driver reviewer (Manivannan Sadhasivam) - Disable MHI RAM data parity error interrupt for qcom SA8775P SoC to work around hardware erratum that causes a constant stream of interrupts (Manivannan Sadhasivam) - Don't try to fall back to qcom Operating Performance Points (OPP) support unless the platform actually supports OPP (Manivannan Sadhasivam) - Add [email protected] mailing list to MAINTAINERS for NXP layerscape and imx6 PCI controller drivers (Frank Li) * tag 'pci-v6.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: MAINTAINERS: PCI: Add NXP PCI controller mailing list [email protected] PCI: qcom: Use OPP only if the platform supports it PCI: qcom-ep: Disable MHI RAM data parity error interrupt for SA8775P SoC MAINTAINERS: Add Manivannan Sadhasivam as Reviewer for PCI native host bridge and endpoint drivers
2 parents 216d163 + 150b572 commit 8101b27

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

MAINTAINERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17439,6 +17439,7 @@ M: Roy Zang <[email protected]>
1743917439
1744017440
1744117441
L: [email protected] (moderated for non-subscribers)
17442+
1744217443
S: Maintained
1744317444
F: drivers/pci/controller/dwc/*layerscape*
1744417445

@@ -17465,6 +17466,7 @@ M: Richard Zhu <[email protected]>
1746517466
M: Lucas Stach <[email protected]>
1746617467
1746717468
L: [email protected] (moderated for non-subscribers)
17469+
1746817470
S: Maintained
1746917471
F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
1747017472
F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
@@ -17643,6 +17645,7 @@ F: drivers/pci/controller/pci-xgene-msi.c
1764317645
PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
1764417646
M: Lorenzo Pieralisi <[email protected]>
1764517647
M: Krzysztof Wilczyński <[email protected]>
17648+
R: Manivannan Sadhasivam <[email protected]>
1764617649
R: Rob Herring <[email protected]>
1764717650
1764817651
S: Supported

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#define PARF_DEBUG_CNT_AUX_CLK_IN_L1SUB_L2 0xc88
5959
#define PARF_DEVICE_TYPE 0x1000
6060
#define PARF_BDF_TO_SID_CFG 0x2c00
61+
#define PARF_INT_ALL_5_MASK 0x2dcc
6162

6263
/* PARF_INT_ALL_{STATUS/CLEAR/MASK} register fields */
6364
#define PARF_INT_ALL_LINK_DOWN BIT(1)
@@ -127,6 +128,9 @@
127128
/* PARF_CFG_BITS register fields */
128129
#define PARF_CFG_BITS_REQ_EXIT_L1SS_MSI_LTR_EN BIT(1)
129130

131+
/* PARF_INT_ALL_5_MASK fields */
132+
#define PARF_INT_ALL_5_MHI_RAM_DATA_PARITY_ERR BIT(0)
133+
130134
/* ELBI registers */
131135
#define ELBI_SYS_STTS 0x08
132136
#define ELBI_CS2_ENABLE 0xa4
@@ -158,10 +162,12 @@ enum qcom_pcie_ep_link_status {
158162
* struct qcom_pcie_ep_cfg - Per SoC config struct
159163
* @hdma_support: HDMA support on this SoC
160164
* @override_no_snoop: Override NO_SNOOP attribute in TLP to enable cache snooping
165+
* @disable_mhi_ram_parity_check: Disable MHI RAM data parity error check
161166
*/
162167
struct qcom_pcie_ep_cfg {
163168
bool hdma_support;
164169
bool override_no_snoop;
170+
bool disable_mhi_ram_parity_check;
165171
};
166172

167173
/**
@@ -480,6 +486,12 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
480486
PARF_INT_ALL_LINK_UP | PARF_INT_ALL_EDMA;
481487
writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_MASK);
482488

489+
if (pcie_ep->cfg && pcie_ep->cfg->disable_mhi_ram_parity_check) {
490+
val = readl_relaxed(pcie_ep->parf + PARF_INT_ALL_5_MASK);
491+
val &= ~PARF_INT_ALL_5_MHI_RAM_DATA_PARITY_ERR;
492+
writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_5_MASK);
493+
}
494+
483495
ret = dw_pcie_ep_init_registers(&pcie_ep->pci.ep);
484496
if (ret) {
485497
dev_err(dev, "Failed to complete initialization: %d\n", ret);
@@ -901,6 +913,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
901913
static const struct qcom_pcie_ep_cfg cfg_1_34_0 = {
902914
.hdma_support = true,
903915
.override_no_snoop = true,
916+
.disable_mhi_ram_parity_check = true,
904917
};
905918

906919
static const struct of_device_id qcom_pcie_ep_match[] = {

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ struct qcom_pcie {
261261
const struct qcom_pcie_cfg *cfg;
262262
struct dentry *debugfs;
263263
bool suspended;
264+
bool use_pm_opp;
264265
};
265266

266267
#define to_qcom_pcie(x) dev_get_drvdata((x)->dev)
@@ -1433,7 +1434,7 @@ static void qcom_pcie_icc_opp_update(struct qcom_pcie *pcie)
14331434
dev_err(pci->dev, "Failed to set bandwidth for PCIe-MEM interconnect path: %d\n",
14341435
ret);
14351436
}
1436-
} else {
1437+
} else if (pcie->use_pm_opp) {
14371438
freq_mbps = pcie_dev_speed_mbps(pcie_link_speed[speed]);
14381439
if (freq_mbps < 0)
14391440
return;
@@ -1592,6 +1593,8 @@ static int qcom_pcie_probe(struct platform_device *pdev)
15921593
max_freq);
15931594
goto err_pm_runtime_put;
15941595
}
1596+
1597+
pcie->use_pm_opp = true;
15951598
} else {
15961599
/* Skip ICC init if OPP is supported as it is handled by OPP */
15971600
ret = qcom_pcie_icc_init(pcie);
@@ -1683,7 +1686,7 @@ static int qcom_pcie_suspend_noirq(struct device *dev)
16831686
if (ret)
16841687
dev_err(dev, "Failed to disable CPU-PCIe interconnect path: %d\n", ret);
16851688

1686-
if (!pcie->icc_mem)
1689+
if (pcie->use_pm_opp)
16871690
dev_pm_opp_set_opp(pcie->pci->dev, NULL);
16881691
}
16891692
return ret;

0 commit comments

Comments
 (0)