Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2203263rwb; Thu, 8 Dec 2022 22:04:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf5f4s7CNGkyxZG9WRJr7dm0yFNNCwFgCcYqE60lp6T3mtIgIlc5bNjprK/79oipQFBiGpF3 X-Received: by 2002:a17:903:40d1:b0:189:894a:a637 with SMTP id t17-20020a17090340d100b00189894aa637mr5082137pld.65.1670565844007; Thu, 08 Dec 2022 22:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670565843; cv=none; d=google.com; s=arc-20160816; b=Axf7aEu72nbB2CSlmWmHIhlzKrKeZsc8+5pCSjwug73TmKcmTnJqWZby64hNXqK5ha NEdng8BLOkvaybud4NEibsGpNZg7yCSgyKwe9wIFQ+0d2eIk53fgUZVbBcKi0e6rnOBl elza/E3ae1OcG5ZVHbTdN++VU3PkAr7Dq+ixIvzGj1f6eMM9XpRgJa/6gRoOQEAyTB4g LZJRWA/1SrlrruyokSgyMR6MtyxnpVBzH3H017dSum/0ZpW+N0+ZPM31Uq6jSyv47TR/ 1d45cdk0sEfY/zgTKCBYKypOGMA81vqXjY3Eh3QiBeGh0r9cyCcct3hCFSpO2L7BdOag vLAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vtWxq85+Kn4wg7fIvd4MdjxD2PWRFitUCpQG3biK9OI=; b=DvPdPVzdtbS+Vporv7rMs2gk14KUBWUx4UXMZrxPtGEiffX0/PpJrPXTiZcyhXJgWN 4cwosObftqEGs9tjuhtVEA9Rs4/tg9SB9FI4VUS1CbABnC5OvqFUtv/uLZUx+nFSSFjg 6HxPRi2MbxdKAWPivB6ZmY8T05PM8IkiLAHSnCqTNmmm0FPVqOQBIVH8aq1DzjyJsw0P oh/W+gBmqZn3BmrZxgE8aRZg4yGTLvtL0FCU/bExtNjnhvdN7M+ilSjsWASVLL+8o1VK ZeOeP1ds2EfOVVShPgpRP9EojTPyIXi797KJsRenFcdW6aA34JvDspmC7VffZyYTe+Nj /1yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=J6XVp59y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a637553000000b00450283e2ae6si683453pgn.623.2022.12.08.22.03.52; Thu, 08 Dec 2022 22:04:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=J6XVp59y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229719AbiLIFg5 (ORCPT + 73 others); Fri, 9 Dec 2022 00:36:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbiLIFgv (ORCPT ); Fri, 9 Dec 2022 00:36:51 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DC4962E97 for ; Thu, 8 Dec 2022 21:36:47 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B8JjZUs001924; Thu, 8 Dec 2022 21:36:36 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=vtWxq85+Kn4wg7fIvd4MdjxD2PWRFitUCpQG3biK9OI=; b=J6XVp59yBgbM64D8vbnGvsLzrjZf0CdpYdHwD8NZ9PFegSigdAZgP+Kqoo5/1iezBLu3 Fx6rtRJcrEYpJ3tZLB1xDqouV9YtXJzJ4bwwTYZaJtzLfxOjSQNuf2addvdFcD49URPr 0IT1BMQgVIxtLTExVEOqQDlONFLLmTDqpaBemaK/sAbDtsuVqEJUEODbNLI11xhsF2ah j8LD7/H9zhclmH59PGXNURXkE49Ai72APFjzMjdEarIi35a5qqZBl5CVtculP/zoMjZz WNB5ypa2EsnHwaEVsdNGXw1XABrb4Pd4ftcbyeWv9BlUJL/3q4rDhKQUFqHLIxRoW3zL TA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3mb22sxc2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 08 Dec 2022 21:36:36 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 8 Dec 2022 21:36:34 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 8 Dec 2022 21:36:34 -0800 Received: from IPBU-BLR-SERVER1.marvell.com (IPBU-BLR-SERVER1.marvell.com [10.28.8.41]) by maili.marvell.com (Postfix) with ESMTP id 7667A3F7062; Thu, 8 Dec 2022 21:36:31 -0800 (PST) From: Gowthami Thiagarajan To: , , , CC: , , , Gowthami Thiagarajan Subject: [PATCH] perf/marvell: Add ACPI support to DDR uncore driver Date: Fri, 9 Dec 2022 11:06:07 +0530 Message-ID: <20221209053607.3929964-1-gthiagarajan@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: _RKBXP5kIzmDPXwwe3RfFrzWaK2AqBo_ X-Proofpoint-GUID: _RKBXP5kIzmDPXwwe3RfFrzWaK2AqBo_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-09_02,2022-12-08_01,2022-06-22_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for ACPI based device registration so that the driver can be also enabled through ACPI table. Signed-off-by: Gowthami Thiagarajan --- drivers/perf/marvell_cn10k_ddr_pmu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #include #include +#include /* 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, -- 2.25.1