|
16 | 16 |
|
17 | 17 | #define QCOM_DUMMY_VAL -1
|
18 | 18 |
|
| 19 | +/* |
| 20 | + * SMMU-500 TRM defines BIT(0) as CMTLB (Enable context caching in the |
| 21 | + * macro TLB) and BIT(1) as CPRE (Enable context caching in the prefetch |
| 22 | + * buffer). The remaining bits are implementation defined and vary across |
| 23 | + * SoCs. |
| 24 | + */ |
| 25 | + |
| 26 | +#define CPRE (1 << 1) |
| 27 | +#define CMTLB (1 << 0) |
| 28 | +#define PREFETCH_SHIFT 8 |
| 29 | +#define PREFETCH_DEFAULT 0 |
| 30 | +#define PREFETCH_SHALLOW (1 << PREFETCH_SHIFT) |
| 31 | +#define PREFETCH_MODERATE (2 << PREFETCH_SHIFT) |
| 32 | +#define PREFETCH_DEEP (3 << PREFETCH_SHIFT) |
19 | 33 | #define GFX_ACTLR_PRR (1 << 5)
|
20 | 34 |
|
| 35 | +static const struct of_device_id qcom_smmu_actlr_client_of_match[] = { |
| 36 | + { .compatible = "qcom,adreno", |
| 37 | + .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) }, |
| 38 | + { .compatible = "qcom,adreno-gmu", |
| 39 | + .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) }, |
| 40 | + { .compatible = "qcom,adreno-smmu", |
| 41 | + .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) }, |
| 42 | + { .compatible = "qcom,fastrpc", |
| 43 | + .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) }, |
| 44 | + { .compatible = "qcom,sc7280-mdss", |
| 45 | + .data = (const void *) (PREFETCH_SHALLOW | CPRE | CMTLB) }, |
| 46 | + { .compatible = "qcom,sc7280-venus", |
| 47 | + .data = (const void *) (PREFETCH_SHALLOW | CPRE | CMTLB) }, |
| 48 | + { .compatible = "qcom,sm8550-mdss", |
| 49 | + .data = (const void *) (PREFETCH_DEFAULT | CMTLB) }, |
| 50 | + { } |
| 51 | +}; |
| 52 | + |
21 | 53 | static struct qcom_smmu *to_qcom_smmu(struct arm_smmu_device *smmu)
|
22 | 54 | {
|
23 | 55 | return container_of(smmu, struct qcom_smmu, smmu);
|
@@ -635,6 +667,7 @@ static const struct qcom_smmu_match_data qcom_smmu_500_impl0_data = {
|
635 | 667 | .impl = &qcom_smmu_500_impl,
|
636 | 668 | .adreno_impl = &qcom_adreno_smmu_500_impl,
|
637 | 669 | .cfg = &qcom_smmu_impl0_cfg,
|
| 670 | + .client_match = qcom_smmu_actlr_client_of_match, |
638 | 671 | };
|
639 | 672 |
|
640 | 673 | /*
|
|
0 commit comments