|
58 | 58 | #define PARF_DEBUG_CNT_AUX_CLK_IN_L1SUB_L2 0xc88
|
59 | 59 | #define PARF_DEVICE_TYPE 0x1000
|
60 | 60 | #define PARF_BDF_TO_SID_CFG 0x2c00
|
| 61 | +#define PARF_INT_ALL_5_MASK 0x2dcc |
61 | 62 |
|
62 | 63 | /* PARF_INT_ALL_{STATUS/CLEAR/MASK} register fields */
|
63 | 64 | #define PARF_INT_ALL_LINK_DOWN BIT(1)
|
|
127 | 128 | /* PARF_CFG_BITS register fields */
|
128 | 129 | #define PARF_CFG_BITS_REQ_EXIT_L1SS_MSI_LTR_EN BIT(1)
|
129 | 130 |
|
| 131 | +/* PARF_INT_ALL_5_MASK fields */ |
| 132 | +#define PARF_INT_ALL_5_MHI_RAM_DATA_PARITY_ERR BIT(0) |
| 133 | + |
130 | 134 | /* ELBI registers */
|
131 | 135 | #define ELBI_SYS_STTS 0x08
|
132 | 136 | #define ELBI_CS2_ENABLE 0xa4
|
@@ -158,10 +162,12 @@ enum qcom_pcie_ep_link_status {
|
158 | 162 | * struct qcom_pcie_ep_cfg - Per SoC config struct
|
159 | 163 | * @hdma_support: HDMA support on this SoC
|
160 | 164 | * @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 |
161 | 166 | */
|
162 | 167 | struct qcom_pcie_ep_cfg {
|
163 | 168 | bool hdma_support;
|
164 | 169 | bool override_no_snoop;
|
| 170 | + bool disable_mhi_ram_parity_check; |
165 | 171 | };
|
166 | 172 |
|
167 | 173 | /**
|
@@ -480,6 +486,12 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
|
480 | 486 | PARF_INT_ALL_LINK_UP | PARF_INT_ALL_EDMA;
|
481 | 487 | writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_MASK);
|
482 | 488 |
|
| 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 | + |
483 | 495 | ret = dw_pcie_ep_init_registers(&pcie_ep->pci.ep);
|
484 | 496 | if (ret) {
|
485 | 497 | dev_err(dev, "Failed to complete initialization: %d\n", ret);
|
@@ -901,6 +913,7 @@ static void qcom_pcie_ep_remove(struct platform_device *pdev)
|
901 | 913 | static const struct qcom_pcie_ep_cfg cfg_1_34_0 = {
|
902 | 914 | .hdma_support = true,
|
903 | 915 | .override_no_snoop = true,
|
| 916 | + .disable_mhi_ram_parity_check = true, |
904 | 917 | };
|
905 | 918 |
|
906 | 919 | static const struct of_device_id qcom_pcie_ep_match[] = {
|
|
0 commit comments