@@ -376,7 +376,15 @@ static int qcom_sdm845_smmu500_reset(struct arm_smmu_device *smmu)
376
376
return ret ;
377
377
}
378
378
379
- static const struct arm_smmu_impl qcom_smmu_impl = {
379
+ static const struct arm_smmu_impl qcom_smmu_v2_impl = {
380
+ .init_context = qcom_smmu_init_context ,
381
+ .cfg_probe = qcom_smmu_cfg_probe ,
382
+ .def_domain_type = qcom_smmu_def_domain_type ,
383
+ .write_s2cr = qcom_smmu_write_s2cr ,
384
+ .tlb_sync = qcom_smmu_tlb_sync ,
385
+ };
386
+
387
+ static const struct arm_smmu_impl qcom_smmu_500_impl = {
380
388
.init_context = qcom_smmu_init_context ,
381
389
.cfg_probe = qcom_smmu_cfg_probe ,
382
390
.def_domain_type = qcom_smmu_def_domain_type ,
@@ -394,7 +402,15 @@ static const struct arm_smmu_impl sdm845_smmu_500_impl = {
394
402
.tlb_sync = qcom_smmu_tlb_sync ,
395
403
};
396
404
397
- static const struct arm_smmu_impl qcom_adreno_smmu_impl = {
405
+ static const struct arm_smmu_impl qcom_adreno_smmu_v2_impl = {
406
+ .init_context = qcom_adreno_smmu_init_context ,
407
+ .def_domain_type = qcom_smmu_def_domain_type ,
408
+ .alloc_context_bank = qcom_adreno_smmu_alloc_context_bank ,
409
+ .write_sctlr = qcom_adreno_smmu_write_sctlr ,
410
+ .tlb_sync = qcom_smmu_tlb_sync ,
411
+ };
412
+
413
+ static const struct arm_smmu_impl qcom_adreno_smmu_500_impl = {
398
414
.init_context = qcom_adreno_smmu_init_context ,
399
415
.def_domain_type = qcom_smmu_def_domain_type ,
400
416
.reset = arm_mmu500_reset ,
@@ -452,12 +468,12 @@ static const struct qcom_smmu_config qcom_smmu_impl0_cfg = {
452
468
*/
453
469
static const struct qcom_smmu_match_data msm8996_smmu_data = {
454
470
.impl = NULL ,
455
- .adreno_impl = & qcom_adreno_smmu_impl ,
471
+ .adreno_impl = & qcom_adreno_smmu_v2_impl ,
456
472
};
457
473
458
- static const struct qcom_smmu_match_data qcom_smmu_data = {
459
- .impl = & qcom_smmu_impl ,
460
- .adreno_impl = & qcom_adreno_smmu_impl ,
474
+ static const struct qcom_smmu_match_data qcom_smmu_v2_data = {
475
+ .impl = & qcom_smmu_v2_impl ,
476
+ .adreno_impl = & qcom_adreno_smmu_v2_impl ,
461
477
};
462
478
463
479
static const struct qcom_smmu_match_data sdm845_smmu_500_data = {
@@ -470,22 +486,22 @@ static const struct qcom_smmu_match_data sdm845_smmu_500_data = {
470
486
};
471
487
472
488
static const struct qcom_smmu_match_data qcom_smmu_500_impl0_data = {
473
- .impl = & qcom_smmu_impl ,
474
- .adreno_impl = & qcom_adreno_smmu_impl ,
489
+ .impl = & qcom_smmu_500_impl ,
490
+ .adreno_impl = & qcom_adreno_smmu_500_impl ,
475
491
.cfg = & qcom_smmu_impl0_cfg ,
476
492
};
477
493
478
494
static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match [] = {
479
495
{ .compatible = "qcom,msm8996-smmu-v2" , .data = & msm8996_smmu_data },
480
- { .compatible = "qcom,msm8998-smmu-v2" , .data = & qcom_smmu_data },
496
+ { .compatible = "qcom,msm8998-smmu-v2" , .data = & qcom_smmu_v2_data },
481
497
{ .compatible = "qcom,qcm2290-smmu-500" , .data = & qcom_smmu_500_impl0_data },
482
498
{ .compatible = "qcom,qdu1000-smmu-500" , .data = & qcom_smmu_500_impl0_data },
483
499
{ .compatible = "qcom,sc7180-smmu-500" , .data = & qcom_smmu_500_impl0_data },
484
500
{ .compatible = "qcom,sc7280-smmu-500" , .data = & qcom_smmu_500_impl0_data },
485
501
{ .compatible = "qcom,sc8180x-smmu-500" , .data = & qcom_smmu_500_impl0_data },
486
502
{ .compatible = "qcom,sc8280xp-smmu-500" , .data = & qcom_smmu_500_impl0_data },
487
- { .compatible = "qcom,sdm630-smmu-v2" , .data = & qcom_smmu_data },
488
- { .compatible = "qcom,sdm845-smmu-v2" , .data = & qcom_smmu_data },
503
+ { .compatible = "qcom,sdm630-smmu-v2" , .data = & qcom_smmu_v2_data },
504
+ { .compatible = "qcom,sdm845-smmu-v2" , .data = & qcom_smmu_v2_data },
489
505
{ .compatible = "qcom,sdm845-smmu-500" , .data = & sdm845_smmu_500_data },
490
506
{ .compatible = "qcom,sm6115-smmu-500" , .data = & qcom_smmu_500_impl0_data },
491
507
{ .compatible = "qcom,sm6125-smmu-500" , .data = & qcom_smmu_500_impl0_data },
0 commit comments