Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf/marvell: Add ACPI support to DDR uncore driver

Add support for ACPI based device registration so that the driver
can be also enabled through ACPI table.

Signed-off-by: Gowthami Thiagarajan <gthiagarajan@marvell.com>
Link: https://lore.kernel.org/r/20221209053607.3929964-1-gthiagarajan@marvell.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Gowthami Thiagarajan and committed by
Will Deacon
e85930f0 bb21ef19

+10
+10
drivers/perf/marvell_cn10k_ddr_pmu.c
··· 12 12 #include <linux/of_device.h> 13 13 #include <linux/perf_event.h> 14 14 #include <linux/hrtimer.h> 15 + #include <linux/acpi.h> 15 16 16 17 /* Performance Counters Operating Mode Control Registers */ 17 18 #define DDRC_PERF_CNT_OP_MODE_CTRL 0x8020 ··· 718 717 MODULE_DEVICE_TABLE(of, cn10k_ddr_pmu_of_match); 719 718 #endif 720 719 720 + #ifdef CONFIG_ACPI 721 + static const struct acpi_device_id cn10k_ddr_pmu_acpi_match[] = { 722 + {"MRVL000A", 0}, 723 + {}, 724 + }; 725 + MODULE_DEVICE_TABLE(acpi, cn10k_ddr_pmu_acpi_match); 726 + #endif 727 + 721 728 static struct platform_driver cn10k_ddr_pmu_driver = { 722 729 .driver = { 723 730 .name = "cn10k-ddr-pmu", 724 731 .of_match_table = of_match_ptr(cn10k_ddr_pmu_of_match), 732 + .acpi_match_table = ACPI_PTR(cn10k_ddr_pmu_acpi_match), 725 733 .suppress_bind_attrs = true, 726 734 }, 727 735 .probe = cn10k_ddr_perf_probe,