|
51 | 51 | #define PARF_SID_OFFSET 0x234
|
52 | 52 | #define PARF_BDF_TRANSLATE_CFG 0x24c
|
53 | 53 | #define PARF_SLV_ADDR_SPACE_SIZE 0x358
|
| 54 | +#define PARF_NO_SNOOP_OVERIDE 0x3d4 |
54 | 55 | #define PARF_DEVICE_TYPE 0x1000
|
55 | 56 | #define PARF_BDF_TO_SID_TABLE_N 0x2000
|
56 | 57 | #define PARF_BDF_TO_SID_CFG 0x2c00
|
|
118 | 119 | /* PARF_LTSSM register fields */
|
119 | 120 | #define LTSSM_EN BIT(8)
|
120 | 121 |
|
| 122 | +/* PARF_NO_SNOOP_OVERIDE register fields */ |
| 123 | +#define WR_NO_SNOOP_OVERIDE_EN BIT(1) |
| 124 | +#define RD_NO_SNOOP_OVERIDE_EN BIT(3) |
| 125 | + |
121 | 126 | /* PARF_DEVICE_TYPE register fields */
|
122 | 127 | #define DEVICE_TYPE_RC 0x4
|
123 | 128 |
|
@@ -229,8 +234,15 @@ struct qcom_pcie_ops {
|
229 | 234 | int (*config_sid)(struct qcom_pcie *pcie);
|
230 | 235 | };
|
231 | 236 |
|
| 237 | + /** |
| 238 | + * struct qcom_pcie_cfg - Per SoC config struct |
| 239 | + * @ops: qcom PCIe ops structure |
| 240 | + * @override_no_snoop: Override NO_SNOOP attribute in TLP to enable cache |
| 241 | + * snooping |
| 242 | + */ |
232 | 243 | struct qcom_pcie_cfg {
|
233 | 244 | const struct qcom_pcie_ops *ops;
|
| 245 | + bool override_no_snoop; |
234 | 246 | bool no_l0s;
|
235 | 247 | };
|
236 | 248 |
|
@@ -930,6 +942,12 @@ static int qcom_pcie_init_2_7_0(struct qcom_pcie *pcie)
|
930 | 942 |
|
931 | 943 | static int qcom_pcie_post_init_2_7_0(struct qcom_pcie *pcie)
|
932 | 944 | {
|
| 945 | + const struct qcom_pcie_cfg *pcie_cfg = pcie->cfg; |
| 946 | + |
| 947 | + if (pcie_cfg->override_no_snoop) |
| 948 | + writel(WR_NO_SNOOP_OVERIDE_EN | RD_NO_SNOOP_OVERIDE_EN, |
| 949 | + pcie->parf + PARF_NO_SNOOP_OVERIDE); |
| 950 | + |
933 | 951 | qcom_pcie_clear_aspm_l0s(pcie->pci);
|
934 | 952 | qcom_pcie_clear_hpc(pcie->pci);
|
935 | 953 |
|
@@ -1305,6 +1323,11 @@ static const struct qcom_pcie_cfg cfg_1_9_0 = {
|
1305 | 1323 | .ops = &ops_1_9_0,
|
1306 | 1324 | };
|
1307 | 1325 |
|
| 1326 | +static const struct qcom_pcie_cfg cfg_1_34_0 = { |
| 1327 | + .ops = &ops_1_9_0, |
| 1328 | + .override_no_snoop = true, |
| 1329 | +}; |
| 1330 | + |
1308 | 1331 | static const struct qcom_pcie_cfg cfg_2_1_0 = {
|
1309 | 1332 | .ops = &ops_2_1_0,
|
1310 | 1333 | };
|
@@ -1606,7 +1629,7 @@ static const struct of_device_id qcom_pcie_match[] = {
|
1606 | 1629 | { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 },
|
1607 | 1630 | { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 },
|
1608 | 1631 | { .compatible = "qcom,pcie-sa8540p", .data = &cfg_sc8280xp },
|
1609 |
| - { .compatible = "qcom,pcie-sa8775p", .data = &cfg_1_9_0}, |
| 1632 | + { .compatible = "qcom,pcie-sa8775p", .data = &cfg_1_34_0}, |
1610 | 1633 | { .compatible = "qcom,pcie-sc7280", .data = &cfg_1_9_0 },
|
1611 | 1634 | { .compatible = "qcom,pcie-sc8180x", .data = &cfg_1_9_0 },
|
1612 | 1635 | { .compatible = "qcom,pcie-sc8280xp", .data = &cfg_sc8280xp },
|
|
0 commit comments