@@ -430,11 +430,22 @@ static struct arm_smmu_device *qcom_smmu_create(struct arm_smmu_device *smmu,
430
430
return ERR_PTR (- ENOMEM );
431
431
432
432
qsmmu -> smmu .impl = impl ;
433
- qsmmu -> cfg = qcom_smmu_impl_data ( smmu ) ;
433
+ qsmmu -> cfg = data -> cfg ;
434
434
435
435
return & qsmmu -> smmu ;
436
436
}
437
437
438
+ /* Implementation Defined Register Space 0 register offsets */
439
+ static const u32 qcom_smmu_impl0_reg_offset [] = {
440
+ [QCOM_SMMU_TBU_PWR_STATUS ] = 0x2204 ,
441
+ [QCOM_SMMU_STATS_SYNC_INV_TBU_ACK ] = 0x25dc ,
442
+ [QCOM_SMMU_MMU2QSS_AND_SAFE_WAIT_CNTR ] = 0x2670 ,
443
+ };
444
+
445
+ static const struct qcom_smmu_config qcom_smmu_impl0_cfg = {
446
+ .reg_offset = qcom_smmu_impl0_reg_offset ,
447
+ };
448
+
438
449
/*
439
450
* It is not yet possible to use MDP SMMU with the bypass quirk on the msm8996,
440
451
* there are not enough context banks.
@@ -455,28 +466,35 @@ static const struct qcom_smmu_match_data sdm845_smmu_500_data = {
455
466
* No need for adreno impl here. On sdm845 the Adreno SMMU is handled
456
467
* by the separate sdm845-smmu-v2 device.
457
468
*/
469
+ /* Also no debug configuration. */
470
+ };
471
+
472
+ static const struct qcom_smmu_match_data qcom_smmu_500_impl0_data = {
473
+ .impl = & qcom_smmu_impl ,
474
+ .adreno_impl = & qcom_adreno_smmu_impl ,
475
+ .cfg = & qcom_smmu_impl0_cfg ,
458
476
};
459
477
460
478
static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match [] = {
461
479
{ .compatible = "qcom,msm8996-smmu-v2" , .data = & msm8996_smmu_data },
462
480
{ .compatible = "qcom,msm8998-smmu-v2" , .data = & qcom_smmu_data },
463
- { .compatible = "qcom,qcm2290-smmu-500" , .data = & qcom_smmu_data },
464
- { .compatible = "qcom,qdu1000-smmu-500" , .data = & qcom_smmu_data },
465
- { .compatible = "qcom,sc7180-smmu-500" , .data = & qcom_smmu_data },
466
- { .compatible = "qcom,sc7280-smmu-500" , .data = & qcom_smmu_data },
467
- { .compatible = "qcom,sc8180x-smmu-500" , .data = & qcom_smmu_data },
468
- { .compatible = "qcom,sc8280xp-smmu-500" , .data = & qcom_smmu_data },
481
+ { .compatible = "qcom,qcm2290-smmu-500" , .data = & qcom_smmu_500_impl0_data },
482
+ { .compatible = "qcom,qdu1000-smmu-500" , .data = & qcom_smmu_500_impl0_data },
483
+ { .compatible = "qcom,sc7180-smmu-500" , .data = & qcom_smmu_500_impl0_data },
484
+ { .compatible = "qcom,sc7280-smmu-500" , .data = & qcom_smmu_500_impl0_data },
485
+ { .compatible = "qcom,sc8180x-smmu-500" , .data = & qcom_smmu_500_impl0_data },
486
+ { .compatible = "qcom,sc8280xp-smmu-500" , .data = & qcom_smmu_500_impl0_data },
469
487
{ .compatible = "qcom,sdm630-smmu-v2" , .data = & qcom_smmu_data },
470
488
{ .compatible = "qcom,sdm845-smmu-v2" , .data = & qcom_smmu_data },
471
489
{ .compatible = "qcom,sdm845-smmu-500" , .data = & sdm845_smmu_500_data },
472
- { .compatible = "qcom,sm6115-smmu-500" , .data = & qcom_smmu_data },
473
- { .compatible = "qcom,sm6125-smmu-500" , .data = & qcom_smmu_data },
474
- { .compatible = "qcom,sm6350-smmu-500" , .data = & qcom_smmu_data },
475
- { .compatible = "qcom,sm6375-smmu-500" , .data = & qcom_smmu_data },
476
- { .compatible = "qcom,sm8150-smmu-500" , .data = & qcom_smmu_data },
477
- { .compatible = "qcom,sm8250-smmu-500" , .data = & qcom_smmu_data },
478
- { .compatible = "qcom,sm8350-smmu-500" , .data = & qcom_smmu_data },
479
- { .compatible = "qcom,sm8450-smmu-500" , .data = & qcom_smmu_data },
490
+ { .compatible = "qcom,sm6115-smmu-500" , .data = & qcom_smmu_500_impl0_data },
491
+ { .compatible = "qcom,sm6125-smmu-500" , .data = & qcom_smmu_500_impl0_data },
492
+ { .compatible = "qcom,sm6350-smmu-500" , .data = & qcom_smmu_500_impl0_data },
493
+ { .compatible = "qcom,sm6375-smmu-500" , .data = & qcom_smmu_500_impl0_data },
494
+ { .compatible = "qcom,sm8150-smmu-500" , .data = & qcom_smmu_500_impl0_data },
495
+ { .compatible = "qcom,sm8250-smmu-500" , .data = & qcom_smmu_500_impl0_data },
496
+ { .compatible = "qcom,sm8350-smmu-500" , .data = & qcom_smmu_500_impl0_data },
497
+ { .compatible = "qcom,sm8450-smmu-500" , .data = & qcom_smmu_500_impl0_data },
480
498
{ }
481
499
};
482
500
@@ -497,7 +515,7 @@ struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu)
497
515
if (np == NULL ) {
498
516
/* Match platform for ACPI boot */
499
517
if (acpi_match_platform_list (qcom_acpi_platlist ) >= 0 )
500
- return qcom_smmu_create (smmu , & qcom_smmu_data );
518
+ return qcom_smmu_create (smmu , & qcom_smmu_500_impl0_data );
501
519
}
502
520
#endif
503
521
0 commit comments