mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-21 03:54:03 +08:00
perf/smmuv3: Add devicetree support
Add device-tree support to the SMMUv3 PMCG driver. Signed-off-by: Jay Chen <jkchen@linux.alibaba.com> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/20211117144844.241072-3-jean-philippe@linaro.org Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
2704e75943
commit
3f7be43561
@ -47,6 +47,7 @@
|
|||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/msi.h>
|
#include <linux/msi.h>
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/perf_event.h>
|
#include <linux/perf_event.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
@ -834,7 +835,8 @@ static int smmu_pmu_probe(struct platform_device *pdev)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
smmu_pmu_get_acpi_options(smmu_pmu);
|
if (!dev->of_node)
|
||||||
|
smmu_pmu_get_acpi_options(smmu_pmu);
|
||||||
|
|
||||||
/* Pick one CPU to be the preferred one to use */
|
/* Pick one CPU to be the preferred one to use */
|
||||||
smmu_pmu->on_cpu = raw_smp_processor_id();
|
smmu_pmu->on_cpu = raw_smp_processor_id();
|
||||||
@ -884,9 +886,16 @@ static void smmu_pmu_shutdown(struct platform_device *pdev)
|
|||||||
smmu_pmu_disable(&smmu_pmu->pmu);
|
smmu_pmu_disable(&smmu_pmu->pmu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const struct of_device_id smmu_pmu_of_match[] = {
|
||||||
|
{ .compatible = "arm,smmu-v3-pmcg" },
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(of, smmu_pmu_of_match);
|
||||||
|
|
||||||
static struct platform_driver smmu_pmu_driver = {
|
static struct platform_driver smmu_pmu_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "arm-smmu-v3-pmcg",
|
.name = "arm-smmu-v3-pmcg",
|
||||||
|
.of_match_table = of_match_ptr(smmu_pmu_of_match),
|
||||||
.suppress_bind_attrs = true,
|
.suppress_bind_attrs = true,
|
||||||
},
|
},
|
||||||
.probe = smmu_pmu_probe,
|
.probe = smmu_pmu_probe,
|
||||||
|
Loading…
Reference in New Issue
Block a user