diff mbox series

perf/marvell: Add ACPI support to DDR uncore driver

Message ID 20221209053607.3929964-1-gthiagarajan@marvell.com (mailing list archive)
State New, archived
Headers show
Series perf/marvell: Add ACPI support to DDR uncore driver | expand

Commit Message

Gowthami Thiagarajan Dec. 9, 2022, 5:36 a.m. UTC
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>
---
 drivers/perf/marvell_cn10k_ddr_pmu.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Will Deacon Jan. 19, 2023, 7:08 p.m. UTC | #1
On Fri, 9 Dec 2022 11:06:07 +0530, Gowthami Thiagarajan wrote:
> Add support for ACPI based device registration so that the driver
> can be also enabled through ACPI table.
> 
> 

Applied to will (for-next/perf), thanks!

[1/1] perf/marvell: Add ACPI support to DDR uncore driver
      https://git.kernel.org/will/c/e85930f06f0e

Cheers,
diff mbox series

Patch

diff --git a/drivers/perf/marvell_cn10k_ddr_pmu.c b/drivers/perf/marvell_cn10k_ddr_pmu.c
index 665b382a0ee3..b94a5f6cc22b 100644
--- a/drivers/perf/marvell_cn10k_ddr_pmu.c
+++ b/drivers/perf/marvell_cn10k_ddr_pmu.c
@@ -12,6 +12,7 @@ 
 #include <linux/of_device.h>
 #include <linux/perf_event.h>
 #include <linux/hrtimer.h>
+#include <linux/acpi.h>
 
 /* Performance Counters Operating Mode Control Registers */
 #define DDRC_PERF_CNT_OP_MODE_CTRL	0x8020
@@ -717,10 +718,19 @@  static const struct of_device_id cn10k_ddr_pmu_of_match[] = {
 MODULE_DEVICE_TABLE(of, cn10k_ddr_pmu_of_match);
 #endif
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id cn10k_ddr_pmu_acpi_match[] = {
+	{"MRVL000A", 0},
+	{},
+};
+MODULE_DEVICE_TABLE(acpi, cn10k_ddr_pmu_acpi_match);
+#endif
+
 static struct platform_driver cn10k_ddr_pmu_driver = {
 	.driver	= {
 		.name   = "cn10k-ddr-pmu",
 		.of_match_table = of_match_ptr(cn10k_ddr_pmu_of_match),
+		.acpi_match_table  = ACPI_PTR(cn10k_ddr_pmu_acpi_match),
 		.suppress_bind_attrs = true,
 	},
 	.probe		= cn10k_ddr_perf_probe,