[PATCH 3/4] perf/smmuv3: add device tree support

Ajay Kumar ajaykumar.rs at samsung.com
Sun Jul 12 12:33:40 EDT 2020


Add a OF match table with compatible string to add device tree
support onto arm_smmuv3_pmu driver.

Signed-off-by: Ajay Kumar <ajaykumar.rs at samsung.com>
---
 drivers/perf/arm_smmuv3_pmu.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 48e28ef93a70..25feab718c20 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -856,9 +856,15 @@ static void smmu_pmu_shutdown(struct platform_device *pdev)
 	smmu_pmu_disable(&smmu_pmu->pmu);
 }
 
+static const struct of_device_id arm_smmu_pmu_match[] = {
+	{ .compatible = "arm-smmu-v3-pmu", },
+	{},
+};
+
 static struct platform_driver smmu_pmu_driver = {
 	.driver = {
 		.name = "arm-smmu-v3-pmcg",
+		.of_match_table = arm_smmu_pmu_match,
 	},
 	.probe = smmu_pmu_probe,
 	.remove = smmu_pmu_remove,
-- 
2.17.1




More information about the linux-arm-kernel mailing list