From patchwork Mon Nov 30 11:42:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 335328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAB62C64E7B for ; Mon, 30 Nov 2020 11:43:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D7F0206C1 for ; Mon, 30 Nov 2020 11:43:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="gw64stBr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728544AbgK3LnQ (ORCPT ); Mon, 30 Nov 2020 06:43:16 -0500 Received: from mail-eopbgr40084.outbound.protection.outlook.com ([40.107.4.84]:43512 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726137AbgK3LnP (ORCPT ); Mon, 30 Nov 2020 06:43:15 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cf/s9sQYDn9l7iczUqKybb9pLOL3p7lHp1ulHzKEzbFRoSo8calQQT83aM7n8Pwp3m4jbeD5IQ5HZbUEYhVFfNMhagFJRNo27ntGEWvvhyUPiL5CgpkgJz66gW2w8jXa0W0ZLiqNspEW0EYGYGA6ePMnz+xEnSh4r4XGKW58X1W7QhccNNcLsbTvxmR+J7nnfoud3UyuWZpMi2GVSHRV/loutzNXvlvel5AaH5eaCeJcI+Zb9OhjR9y7lgQougAZFD6H+CBp1MReixOX7ueOaf46uAuyZ+xuaRd+RhBZRHsLQRINudBWG78YRaRJrl1s9HEBfoGofD2jeEAtBX9zkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ykfL2k9mOycQLZsFj+W7VJqj5rIJRRZpknFW48bZAsc=; b=K2RSK7Dxf+06ct8fgI9cXFcUnmF8swjRhlGHwLVhTRA+D2W4hX0hVZiKNKEJaNKT5XDHLWA0gYr7sf0/YwgIniwQ+IC4ZEgJo1IEWCs63ngkPeXwXci9A5lldKSq3UvjYpu/5uCHQtisegd3WG/oBrAyDoeve5QriezR0ZpnBbONK7DHxThd2X7PW05x2R0WJvNiMM6nLCMPWRzPUwu98B/1wXV7ceFoS3ru6HIz/4SG6DlKw2mxNKtgHMAouaPcCrAdIkMdHuQvUTEz72emcP8FXI9Sx4Ak/BLUjlOP30vvDi6F0UN/aIvavKwp6mGRuIOmAbtSTjfdV4moAGRnzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ykfL2k9mOycQLZsFj+W7VJqj5rIJRRZpknFW48bZAsc=; b=gw64stBr6IdHn0KhHcw5yxQ49JuL5D9twvwKEYYDTmLScVUZ0+loYa99VwBWcZZJwojPrrECOHFg54Ok9bi7ICBJN06OPErMEmRrk+FL+Nl08trBq/aRjfgCuDcNiT6RQjcaLv2NNvc/HIlUPTiiQqV6n6Mu3VhN0CjYa6YmR4g= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB7PR04MB4106.eurprd04.prod.outlook.com (2603:10a6:5:19::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.25; Mon, 30 Nov 2020 11:41:51 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666%4]) with mapi id 15.20.3611.025; Mon, 30 Nov 2020 11:41:51 +0000 From: Joakim Zhang To: will@kernel.org, john.garry@huawei.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-imx@nxp.com, frank.li@nxp.com Subject: [PATCH V2 1/2] bindings: perf: imx-ddr: add compatible string Date: Mon, 30 Nov 2020 19:42:01 +0800 Message-Id: <20201130114202.26057-2-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201130114202.26057-1-qiangqing.zhang@nxp.com> References: <20201130114202.26057-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0099.apcprd06.prod.outlook.com (2603:1096:3:14::25) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR06CA0099.apcprd06.prod.outlook.com (2603:1096:3:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.20 via Frontend Transport; Mon, 30 Nov 2020 11:41:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6bb800fa-a8d3-4753-aa98-08d89524edbd X-MS-TrafficTypeDiagnostic: DB7PR04MB4106: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:361; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Pr3gZxNQPPlqr0bR7wz9xmzNH51WGHfN3n8gxpwIo8HA6NIER1oVdTCuqdtp6yW8An/Fhaw5jObiZmWXlg9P1ZevClura48QY3ANgXfcMcwYAiGn10ww6DZ47AFpTnztG2gKxuBsTsouRo8Kc6g77pnLCaxN2Z/XOf0EWyOpjCoXTrz1BKNl8Go5GgTaEyDwUXTV9Z1fViI2zFIyxjfNM59exQ3Pd1UfG1XMTSTZi430jSzSpF2/xKeIsLRAaGPLGGnUm2byB2snJ1ptV8VUINijvb7GnkRIDNekQiUIVfbYZ/ONEHxo6v8pdINWwZOL4+U9Qg/md0xnzis+unWZoYVK7QfW40lGjuee+rolU9OONHDxqDRM/ZQtiw/fTSi X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(396003)(39860400002)(136003)(366004)(6666004)(36756003)(5660300002)(86362001)(6486002)(2616005)(956004)(478600001)(66476007)(316002)(66556008)(66946007)(6512007)(52116002)(8676002)(8936002)(4326008)(4744005)(186003)(6506007)(26005)(1076003)(16526019)(69590400008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: fL+U0P3+xlZIxqNA39bpMjwN3Il0pfTP81q7Fw4H9hRZw8koEKL9TIKNlGCNG7y0QQeEawayg1fF6SA60y62SP7Mf2MsISC78wGjzSytkPK/jvRHnnqfQFeUVI5BPrXE4yNRwmci/Hx74XWuYo6Lzd8E0ci1z8x1z70Y2wzQObu+JU5T5jxxGYby3E935Id0zuuHKwojubEH2NQQ7tYkptDhCxmWaOZlVwL8OkQF+pwpAmzdqyH8FKmFbXuQBP6j1KjU3404NzTznjW4npsjSapkHCnEz7iOA7VPGVgTeOHx2wvE1E8SJjKxmUbNFR5YQ3h6NpFRGh/ZNtZpaNUGbSpVTMT4+7J07cr7WfVxt6agoinsTwsDN38ZmR/1AzUqaD8bi8KjH8ryqBK74hDlr1ftPcnjdKvOCoOHUCeEPVbytv7RZXLyX07FD8CX4ILtLedngnSplbkYEMmtQZ+rHoR8/Po0c3H/x6VqtOwwS+E/B1Wo1e+OhD43j2V2RWxqX/g356RNROm7Zmd770IY9y1fcZaq/tnzx+m6NXlq59mWfCWMbJL39PO1ZdYxgQcZOrli/H6LakSYDV5a7KTbQP3EQLlP8kGYPvx5fAYSnRXCipLpnipjdnMnfUrMDV8owNb9c0Ur5GigdT5pCLWIW49xzOeLXyWeHv6T307a2OrbH+uED0H3uS5B1sKpfX9iX1g0i4UPBwrd9M12Lp+CbDo6l/N+mz2wDnqO1ryAaNoNZO1BCAkZkGREeGT9sxDGrgWYl1AwidRFBJRuqmZZipaB27p45rz9BTXZGnBbYemBfrZ8PzBQ5hvR0ZMwA9AD1eQxhPCBCivbKFY5qdoGuNUC9KtdcnpQ3Q5Q6mkodroCP+CbaS8BfDEkUsbRdxJubUvWkXj83iYzYj7K6vMJY6rLOPWV7MwTKY7P4O3qDtfk4DvzLZxg9/qyOZo3RFaZJkNFeX5DhXco46/cLAG81sItHU7jg3efsjUScjAMpycA2x/VLg3j+BQ6r4AUxHYT X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bb800fa-a8d3-4753-aa98-08d89524edbd X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2020 11:41:51.6162 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gv63sRqMzy+9YOV3kJzMADmhhaqhEkfjh4X4dulq0Z8JZE3B+StNdQozyBni1AagEOecVxED04CR9+yV/REIUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4106 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add extra compabile string to support driver. Signed-off-by: Joakim Zhang Acked-by: Rob Herring --- Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml index 5aad9f4e0b2a..80a92385367e 100644 --- a/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml +++ b/Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml @@ -15,6 +15,9 @@ properties: - enum: - fsl,imx8-ddr-pmu - fsl,imx8m-ddr-pmu + - fsl,imx8mq-ddr-pmu + - fsl,imx8mm-ddr-pmu + - fsl,imx8mn-ddr-pmu - fsl,imx8mp-ddr-pmu - items: - enum: From patchwork Mon Nov 30 11:42:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 334832 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4571AC64E8A for ; Mon, 30 Nov 2020 11:42:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD9752073C for ; Mon, 30 Nov 2020 11:42:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RmyNG/uK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727569AbgK3Lmp (ORCPT ); Mon, 30 Nov 2020 06:42:45 -0500 Received: from mail-eopbgr130085.outbound.protection.outlook.com ([40.107.13.85]:51917 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728544AbgK3Lmp (ORCPT ); Mon, 30 Nov 2020 06:42:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XiifP2oYxmEPW+DKKiyyLUr5aMoP8XntjT5JSFygI4by7tOfNG+pTxU7HrPS7ppwYE7FaMpiGvW3/FA6W4u/Yga+mu4X7A1Ck5Yl8yFLmhjBymVyj4XLiENgzFzdhY0wTqHO/LZiX9Vt7JaifgbRjEmYZNCGPY/kJrHITrcG+CB5clIBud0xsFRA21q+gSVuYf5/2vuYFaSdYfKHy/1JbYmlOuG4kAuiPd2ayJsFZTqoePdsmuVuVdeBK7JrG11iRJ6mE9J0eUxnA5iMB9kpuzOdHHK9fu1C0n1m+VZXrZAGhrBYn+88jb60aZTZnCXhqSgDIkdDHogWw6OyV6DUSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dNWAt4lv5rsb3h3aO9/8fBhnh6/PCEvRa2XhD5X6Fro=; b=J9KrC1WID69AlWXu++/pS6AQYiRRzKGEfPiSUby158oFjrzyYF++njqaOf8Ojovx2SOOzYmgPsvr1Y4JamICHtVkawTIQPRm8TRuV/zp2STKWABW6Hog0XJAqL4oKk9gSOZOkZBEGcrMwsdMNU+iZ2d3WS9QrdlV2wf2sCU5YJzV8VO9R3Nvla/O8kR7u+/KDQou2tdK5nvvDbnnAHTjbURVJT2rX2TLoaO7sZGB58YB/rq27f/FGIQ1ZEa9BE6YLWUKGkfpfZFoEbpJB/VJA6SywY6dZTYIEy9RwNkxOlB/8WsnQtnwicMlMvnszMd3Ih3EQqqupXTLo/OmBGe5Pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dNWAt4lv5rsb3h3aO9/8fBhnh6/PCEvRa2XhD5X6Fro=; b=RmyNG/uKdQZzijFPb0VPFQqbyUiTAUSYh25O8/a6zgJgUdcUHiqVS/tcET1YsN1wzEfXrjMrFE4TprSkTyU9akIZFs3AmEgaS7u1qLEuF7vj3tmJlZll28jWzcObIG8K0bE75J/YWFXx8uD06eB3u5NAOqwChRB1AY7NyRFxdxI= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB6PR0401MB2501.eurprd04.prod.outlook.com (2603:10a6:4:33::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.23; Mon, 30 Nov 2020 11:41:54 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::b83c:2edc:17e8:2666%4]) with mapi id 15.20.3611.025; Mon, 30 Nov 2020 11:41:54 +0000 From: Joakim Zhang To: will@kernel.org, john.garry@huawei.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-imx@nxp.com, frank.li@nxp.com Subject: [PATCH V2 2/2] perf/imx_ddr: Add system PMU identifier for userspace Date: Mon, 30 Nov 2020 19:42:02 +0800 Message-Id: <20201130114202.26057-3-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201130114202.26057-1-qiangqing.zhang@nxp.com> References: <20201130114202.26057-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0099.apcprd06.prod.outlook.com (2603:1096:3:14::25) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR06CA0099.apcprd06.prod.outlook.com (2603:1096:3:14::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3611.20 via Frontend Transport; Mon, 30 Nov 2020 11:41:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 780f0b57-ee06-4477-cf7f-08d89524ef67 X-MS-TrafficTypeDiagnostic: DB6PR0401MB2501: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EVnlQD3uc4eR/Fp3TiXw1J9s7plczzqn4m47WtSobMds7eR5f+kSfYZsrKDu7MJZpfGOXlXXL5k81842uD999ErmVY4CxpU7ZEHMF291teEqtFrozY2ITaNNAZh0Jf8oz8wAQU6cODDoatLAouafj2x57os4V/iKbEVmNcoPhz1mR4Bt6mXcbZiuJDvcM7ETn/xIOdyZpd+chCAm5GpzZq/x5H08fTqHexCHhTti4yF9KvkOqcVfqc1CmRvx1xYV8lpYIF5PUdrmCauab+OEz4PRfm2UUOpOP8QJtUnzzsTg7B5deh4ScKxYtTuUKZ0dD0Z5PRKyzdng1+BSO5OpsdBzp27NXn1M7V713jkDXYW702WM9bBuypTI+l519DgZ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(366004)(346002)(39860400002)(478600001)(66556008)(36756003)(1076003)(66476007)(69590400008)(186003)(2616005)(16526019)(8676002)(66946007)(8936002)(956004)(5660300002)(52116002)(6666004)(316002)(4326008)(6512007)(6486002)(86362001)(6506007)(2906002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: EBerqfXX7EOO2nbVyak6XUYjfbvDLi4hQiCx1NYNrrOtkh039aP+D1SY3RBOLBkLpnYwSTAFjcR9n5kB1OC0w5DcGXnWPm1NkErpkjqSFO3Pg89Bfyerh8FO3M6Kho2l5fH02+d5SxdEPymBfTP6GT1f0EuqnUiuJNq6mZT7kv2TcMe3DkVzC99w1gMOnF2WZ8OroyGmshJfMGnj0YdbJ28KNCr6TDZOQfxX1i4ma/60NZVvVfSt8z6VTDlkSaSQxWikIg4ph87u5FnEx9SR0S+04rNpZHf1DLMdBS/tJPIgoW2xKvf9IA+RgA1Z6bhZuGM1nF5eiXPWv6KngY64h2cYOcKqQhLmYqxkWcK+lmbGB5qdkRbQOI+mkRmSXQnljYrEA2tOuvjFvV3IvQYtXcMVZHKVuT6k4wWiNPck0TB/NYHQ8tB0KYtCxo8nityTJ/6N+Ekovv6i56dTtgSdZ96rAgGu3LVTcvpFo60Rl2NveHAc77vPSaN6aDlet55jfBi6m+wczxKWuf4AwmJ7bIe8WgRpggaY4CCTtJNh94zfswhYIwAfOfCIwyi19MO26uWUR+k8oVrlhzSNytvU3EkmWkLm05hXKAMcAA9mCoztIg45jKsb5TxAKuOBIGRtwsOKbDGiDSpUYnF33UIWgcfkZp7fdAZU3SVG5DDQnFNhkb8K8Kb/Q0Cv20GSop0c1NM8t8LqJDltdNSaY0UOuIciPEvLYMhFtvFlvROuDhgVspL4eNpWG3TunPyTr6zlLfmvKt9NItx+yu+3QCtI/SXP5eDVLEJl+CfomM7cnbLTkxECLCvV4gxOU4PhgKtx64HovwpTcKSD2m01B/AyIlIHuI42pM4/5lwJ1jruLJVaN9c/A3Rh6eCA7cDUrQuOZflOW1LRRMpRZLMIY31HD9r3E0aoDvtoSvC0UcYl/v7L2HKZ9x32DfSCjHU6nSoaip5PIB56DZMI4vUR/ONulEtyjGOUSz5b633By7EvAPq0B8eAyTfiEsefeomr1rEc X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 780f0b57-ee06-4477-cf7f-08d89524ef67 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2020 11:41:54.3094 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Yd60Hvl3bHPBw4ZHw3pPobyYi1sU/aJ21bEdziHxHCvpqo8PcA7Uoi/FiHuwzJTbcA1bI27gQ/XcB2IW+CK1WA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2501 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The DDR Perf for i.MX8 is a system PMU whose AXI ID would different from SoC to SoC. Need expose system PMU identifier for userspace which refer to /sys/bus/event_source/devices//identifier. Signed-off-by: Joakim Zhang Reviewed-by: John Garry --- drivers/perf/fsl_imx8_ddr_perf.c | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c index 4f063fb1c6b4..a11bfd8a0823 100644 --- a/drivers/perf/fsl_imx8_ddr_perf.c +++ b/drivers/perf/fsl_imx8_ddr_perf.c @@ -50,6 +50,7 @@ static DEFINE_IDA(ddr_ida); struct fsl_ddr_devtype_data { unsigned int quirks; /* quirks needed for different DDR Perf core */ + const char *identifier; /* system PMU identifier for userspace */ }; static const struct fsl_ddr_devtype_data imx8_devtype_data; @@ -58,13 +59,32 @@ static const struct fsl_ddr_devtype_data imx8m_devtype_data = { .quirks = DDR_CAP_AXI_ID_FILTER, }; +static const struct fsl_ddr_devtype_data imx8mq_devtype_data = { + .quirks = DDR_CAP_AXI_ID_FILTER, + .identifier = "i.MX8MQ", +}; + +static const struct fsl_ddr_devtype_data imx8mm_devtype_data = { + .quirks = DDR_CAP_AXI_ID_FILTER, + .identifier = "i.MX8MM", +}; + +static const struct fsl_ddr_devtype_data imx8mn_devtype_data = { + .quirks = DDR_CAP_AXI_ID_FILTER, + .identifier = "i.MX8MN", +}; + static const struct fsl_ddr_devtype_data imx8mp_devtype_data = { .quirks = DDR_CAP_AXI_ID_FILTER_ENHANCED, + .identifier = "i.MX8MP", }; static const struct of_device_id imx_ddr_pmu_dt_ids[] = { { .compatible = "fsl,imx8-ddr-pmu", .data = &imx8_devtype_data}, { .compatible = "fsl,imx8m-ddr-pmu", .data = &imx8m_devtype_data}, + { .compatible = "fsl,imx8mq-ddr-pmu", .data = &imx8mq_devtype_data}, + { .compatible = "fsl,imx8mm-ddr-pmu", .data = &imx8mm_devtype_data}, + { .compatible = "fsl,imx8mn-ddr-pmu", .data = &imx8mn_devtype_data}, { .compatible = "fsl,imx8mp-ddr-pmu", .data = &imx8mp_devtype_data}, { /* sentinel */ } }; @@ -84,6 +104,40 @@ struct ddr_pmu { int id; }; +static ssize_t ddr_perf_identifier_show(struct device *dev, + struct device_attribute *attr, + char *page) +{ + struct ddr_pmu *pmu = dev_get_drvdata(dev); + + return sprintf(page, "%s\n", pmu->devtype_data->identifier); +} + +static umode_t ddr_perf_identifier_attr_visible(struct kobject *kobj, + struct attribute *attr, + int n) +{ + struct device *dev = kobj_to_dev(kobj); + struct ddr_pmu *pmu = dev_get_drvdata(dev); + + if (!pmu->devtype_data->identifier) + return 0; + return attr->mode; +}; + +static struct device_attribute ddr_perf_identifier_attr = + __ATTR(identifier, 0444, ddr_perf_identifier_show, NULL); + +static struct attribute *ddr_perf_identifier_attrs[] = { + &ddr_perf_identifier_attr.attr, + NULL, +}; + +static struct attribute_group ddr_perf_identifier_attr_group = { + .attrs = ddr_perf_identifier_attrs, + .is_visible = ddr_perf_identifier_attr_visible, +}; + enum ddr_perf_filter_capabilities { PERF_CAP_AXI_ID_FILTER = 0, PERF_CAP_AXI_ID_FILTER_ENHANCED, @@ -237,6 +291,7 @@ static const struct attribute_group *attr_groups[] = { &ddr_perf_format_attr_group, &ddr_perf_cpumask_attr_group, &ddr_perf_filter_cap_attr_group, + &ddr_perf_identifier_attr_group, NULL, };