From nobody Wed Jan 15 07:50:37 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE0AFC04AB7 for ; Wed, 20 Sep 2023 20:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbjITUTY (ORCPT ); Wed, 20 Sep 2023 16:19:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjITUTV (ORCPT ); Wed, 20 Sep 2023 16:19:21 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2051.outbound.protection.outlook.com [40.107.8.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 105DCBB; Wed, 20 Sep 2023 13:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OIesLwc8WbHCGfK1BIr8XpLFT1FjGziVQt8nN/Zb9tOM2/U1HZwLYy/Lqe/jbBLxGd8/gZSM2QMr8ivTliWxnIzuatZKJ70yrShz756PF8HoNzyAIWcS+d/5yMa5WtqD1WH5kOZEwBryH3riT8Gf8Gaau/4ME3NKetZ4VRmrDzCR9WdB58JgFzAgonj2cDk0GSF6DHCW1SaAtXHN2Wni8PWw3w9U8Jrv8wNFc7ekadmDgA73eXkubCALJuFsoYObS+8Wjnj6JAMdZLEFjFnyggLFcsDmuVrocRC0i9uGaIxqo/L0q+1hWwwJOo0fBp00oA+Y+u5EqOttCiWatR8aUQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B7UL96OhVHBAKyJd8PS1Vq3LsJ9v9ZzBYW/nGw949d8=; b=fVILPk4qtkbJYdtWox2/QT167qXAuz0bbaKSN/ZbtnC5wHBe4vZbQkQ4CPxI4OKBRx4zNzr5X5bglE70yMcLmUXF1KVfsd44eatXVcScyHTf+OnM1SA8MLHVfKQUEjvETFpC2XhSt1QwwIxgPW8s7fIl+eeAWiiP/NKOMnJewuvU1PCSnGj92PAAGsCJ0l7hwa0af+z81a8zNFIqirP3PaLWCxv+IqTtNrPpYXpfPLPzellnn1pKBDiSNFiH3TkbEbeBoyZisTqduZDp+qXQca7r10VS3pQ3Lzv9D5NN7FFrRM0wBrT+oxQnLEqYYxZhJHZJM645DfGl4AeJqk03tw== 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=B7UL96OhVHBAKyJd8PS1Vq3LsJ9v9ZzBYW/nGw949d8=; b=KYi337xM8TNg99gGip5ag95DlBXOOtBbxoLceyq5RjCAXziM0UyXcmKv7RJPbcPRX+nz1RrGiiBQF5AQGbA8vBtRaXJAf3LIzGO6KzGF9uhTBN2lltrTVUI9WNdsUkKX6yVicGime7mS3co670UPSzqiC9r2TPOtiDzbFx9L0eo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AS1PR04MB9453.eurprd04.prod.outlook.com (2603:10a6:20b:4da::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Wed, 20 Sep 2023 20:19:12 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6792.026; Wed, 20 Sep 2023 20:19:11 +0000 From: Frank Li To: lkp@intel.com, gregkh@linuxfoundation.org, rafael@kernel.org Cc: Frank.Li@nxp.com, dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev, vkoul@kernel.org Subject: [PATCH v3 1/3] debugfs_create_regset32() support 8/16/64 bit width registers Date: Wed, 20 Sep 2023 16:18:50 -0400 Message-Id: <20230920201852.3170104-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920201852.3170104-1-Frank.Li@nxp.com> References: <20230920201852.3170104-1-Frank.Li@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR07CA0026.namprd07.prod.outlook.com (2603:10b6:a02:bc::39) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS1PR04MB9453:EE_ X-MS-Office365-Filtering-Correlation-Id: 12df183f-f58d-4c82-8a6e-08dbba16da57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ho5IoJpmncIl+4cQQbT/ckEPnyFn7SMmJ2p+oYbEPEjOnZJt4dEDOwvzH08c80qIVg7oVhB1ERK21NVP/8UF6Z0oUPv8KsEv46Rw0C6zTn+rtkyMss/iP89qFd4BxzkAztVLLZA2WtHfYP9pPHJycAIPPW8CmpZfWVuqtEGYXOttoV8RkXRfFqicbQGgJ6Ao/IcJmwcVgpANWyyGGjWBYw/EKIRwtg6ufb8MWl38VFpLA46nIfbArTvDPdooLFMsWN4xu5D+AbgdfeXby/cjaTY0HAnGejI1yLDeKLtUalo3vvGLrgHsYH3ya6KFCCBA0uFXyQKa0MiGUtMofsi4GzarcRGj2LyIjZllvzlxYZFAt5sv9Wft3bm83795TvLPPV50eQ1++gG3QIYOglcFNJLbGlAUm/Nwmra3FA6VXpVz4SeusyMuYkozmApHdqAvZ5m9BCfhUEcynfcxvlN1q2oF/jykDn3rBrIcASmy2YQ9bCImKdatKfZx4Ff3VDWW3y9o0XMRHMWGRCQERXF9M5v0A9DM7RBdATPkGVT8e2hsseMMUILTB75tuibk0aqXLl+I1HF+CiuMzqaS9HyFV3+PJr0TxSZa9isjsU/kThepGFVK1xMMmOfFE6kJP8B2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(366004)(396003)(376002)(346002)(451199024)(1800799009)(186009)(6512007)(52116002)(66899024)(6486002)(6506007)(6666004)(38350700002)(86362001)(38100700002)(83380400001)(36756003)(2616005)(1076003)(26005)(66476007)(316002)(66946007)(66556008)(41300700001)(2906002)(5660300002)(8936002)(8676002)(4326008)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZBaUpYGXIq5q2Q5GT8MvV+jW2AituXPA9ykfefzX2VCFtMGpOn5yh7gFKWBz?= =?us-ascii?Q?T/1o1FTKZGyf7OggPRJporHxIWfab+Mgu5dKjSmDTOM7fXZfncoJrxkbL59x?= =?us-ascii?Q?b6Ps5BreR+i0M1+PBPIB1L7V6xpacl0diBKGwcxo6X7t0v9OHKWmnzP7dmdq?= =?us-ascii?Q?awnf7Qeg0t34JQBvqXiQnH3VZf0ZwdHxt3TxCiQHA9Xq1persnic2fRDN2+u?= =?us-ascii?Q?HrRu7kXYrGRghxq2Rq3Ct1aDxMpx7AWUlSX7C2sls/XZNtde2qWpyBWHS98Y?= =?us-ascii?Q?XHnAJysIPJ+fDf8uscEZQ0a2Ttm6YsuKzfigfTWD6wELY2aBMwjC+4hvsEjc?= =?us-ascii?Q?qT7ZWKbXos2LyyDeiyM3cva0/6ZkfEfl/VAO3BAnP/UUJIvwH9wcXe2fPInA?= =?us-ascii?Q?oVvPAbcXcV2+/Z7eb32sWO2HHJqfnEwQLcuGRHYs0Qw3gQDd3QmCIh8JJs/w?= =?us-ascii?Q?rLEZty5aMU05DCdCP84apwh1tnGL8mgzI/Ph9DYUO7wvJZ2Dmt2nlCQv1MLv?= =?us-ascii?Q?JbeSP8pdQNnnRaal+/9V7KjnDO8gLvsaMVOiHrVkITGAIsvT+CSVl3zf5mps?= =?us-ascii?Q?tLhhQxjtfR/xyTK57p9/TpVXntC0ad8cuxKgzRZpuGSAj0OXH/uOACPoxv+e?= =?us-ascii?Q?Sr3BmM4ekE1IHokMjTn+D+BlrrEYGQkiRxRoQ3gJLbx8njuc5NRblv4eHyyS?= =?us-ascii?Q?IDLmSX51PBKWDI5iidRCnthXN1yUjpbYUCSmgoP8V2oUPF0Ls2F4pDeTaGVB?= =?us-ascii?Q?n5NHPUqMGhNMsPr5KFd6b39vbDWnJn/UCjJ5d+KUeObqqAl2AvoHLfuufVDc?= =?us-ascii?Q?gOe0E7RJvODy6vvpFig3JqzpWvwFfmnKzcaBG69DrG14IBrA68VwoEo4N5fI?= =?us-ascii?Q?5qhPNaRw/5WlVN654scvLjl2hwJTJQF4O3YeKKKAvUU9bxqgmQkP/fZusoYV?= =?us-ascii?Q?Yzhxzh67ZclmHN5kOkLvkHX+VsppfJzB3kHBbcvE1lisaAOeXWAXDdzx0qFR?= =?us-ascii?Q?725FjJk7PZ6HGwdnynQsRPsXaLAsXfX+/3Eqjnn9geiJQSjllG68VKwYy8hP?= =?us-ascii?Q?rLzOSP8dgxjn6ax2FEmgmMy0pXutTjPFt8/Qb5Kp0CZUqrxWMZOfxgRATxLM?= =?us-ascii?Q?R5VHW6Wh9jnxZ3cFqJBsv3F/KOujTxLb0F+M3SZW7K38nrbGr4UEew7PjYnf?= =?us-ascii?Q?aNKzhv6K8esopY/oWyWfGguHwOBASfh4GK4rPjHHf2JAK08gkqbtNE5cmqZp?= =?us-ascii?Q?OLfx9TgBrpDJvxcIV6lpLFfH9/k5SLEcN8VPpC+8uvUj/4fiG9fnkkMJVBMC?= =?us-ascii?Q?OjKDsHeOa7VK2vZKzS1mKZCbJOn1GYS17TVhq5DQu16+HGuK/otUNG9GHrdL?= =?us-ascii?Q?mXGb/uWG8TdRjexsA00gS7ywUGv+YGffjbRGU2qVwPFoguEDLZN5/2NxpCH5?= =?us-ascii?Q?S+N33b1pdOdvE2MV39XlYBd4jfU0H/wCIdqqMrt2aDu068jVz6KJcqIzI7mu?= =?us-ascii?Q?HQyGCYQJ3VFXh5ck+bBLm4/05wzy42qNxibo5H28yn3WhG8MVDXOr3Kv7P5d?= =?us-ascii?Q?bhT/eOYehs5R14O7xB2RGPjwv5exRAlEdJ2AaKpM?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12df183f-f58d-4c82-8a6e-08dbba16da57 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2023 20:19:11.9609 (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: LZrGCJwJ+BlXFDE8ySOSlDebFk0lfc7MxzwdrkKLIs9wLkRu2rBZZLTOcThUuR1cr0cqJJs5wVH8GCSEumbZSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9453 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Enhance the flexibility of `debugfs_create_regset32()` to support registers of various bit widths. The key changes are as follows: 1. Renamed '*reg32' and '*regset32' to '*reg' and '*regset' in relevant code to reflect that the register width is not limited to 32 bits. 2. Added 'size' and 'bigendian' fields to the `struct debugfs_reg` to allow for specifying the size and endianness of registers. These additions enable `debugfs_create_regset()` to support a wider range of register types. 3. When 'size' is set to 0, it signifies a 32-bit register. This change maintains compatibility with existing code that assumes 32-bit registers. Improve the versatility of `debugfs_create_regset()` and enable it to handle registers of different sizes and endianness, offering greater flexibility for debugging and monitoring. Signed-off-by: Frank Li --- fs/debugfs/file.c | 59 ++++++++++++++++++++++++++++------------- include/linux/debugfs.h | 17 +++++++++--- 2 files changed, 54 insertions(+), 22 deletions(-) diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 87b3753aa4b1e..5b8d4fd7c7476 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -1137,15 +1137,15 @@ EXPORT_SYMBOL_GPL(debugfs_create_u32_array); #ifdef CONFIG_HAS_IOMEM =20 /* - * The regset32 stuff is used to print 32-bit registers using the + * The regset stuff is used to print 32-bit registers using the * seq_file utilities. We offer printing a register set in an already-open= ed - * sequential file or create a debugfs file that only prints a regset32. + * sequential file or create a debugfs file that only prints a regset. */ =20 /** - * debugfs_print_regs32 - use seq_print to describe a set of registers + * debugfs_print_regs - use seq_print to describe a set of registers * @s: the seq_file structure being used to generate output - * @regs: an array if struct debugfs_reg32 structures + * @regs: an array if struct debugfs_reg structures * @nregs: the length of the above array * @base: the base address to be used in reading the registers * @prefix: a string to be prefixed to every output line @@ -1157,30 +1157,53 @@ EXPORT_SYMBOL_GPL(debugfs_create_u32_array); * because some peripherals have several blocks of identical registers, * for example configuration of dma channels */ -void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *= regs, +void debugfs_print_regs(struct seq_file *s, const struct debugfs_reg *regs, int nregs, void __iomem *base, char *prefix) { + void __iomem *reg; + bool b; int i; =20 for (i =3D 0; i < nregs; i++, regs++) { if (prefix) seq_printf(s, "%s", prefix); - seq_printf(s, "%s =3D 0x%08x\n", regs->name, - readl(base + regs->offset)); + + b =3D regs->bigendian; + reg =3D base + regs->offset; + + switch (regs->size) { + case sizeof(u8): + seq_printf(s, "%s =3D 0x%02x\n", regs->name, ioread8(reg)); + break; + case sizeof(u16): + seq_printf(s, "%s =3D 0x%04x\n", regs->name, + b ? ioread16be(reg) : ioread16(reg)); + break; +#ifdef CONFIG_64BIT + case sizeof(u64): + seq_printf(s, "%s =3D 0x%016llx\n", regs->name, + b ? ioread64be(reg) : ioread64(reg)); + break; +#endif + default: + seq_printf(s, "%s =3D 0x%08x\n", regs->name, + b ? ioread32be(reg) : ioread32(reg)); + } + if (seq_has_overflowed(s)) break; } } -EXPORT_SYMBOL_GPL(debugfs_print_regs32); +EXPORT_SYMBOL_GPL(debugfs_print_regs); =20 -static int debugfs_regset32_show(struct seq_file *s, void *data) +static int debugfs_regset_show(struct seq_file *s, void *data) { - struct debugfs_regset32 *regset =3D s->private; + struct debugfs_regset *regset =3D s->private; =20 if (regset->dev) pm_runtime_get_sync(regset->dev); =20 - debugfs_print_regs32(s, regset->regs, regset->nregs, regset->base, ""); + debugfs_print_regs(s, regset->regs, regset->nregs, regset->base, ""); =20 if (regset->dev) pm_runtime_put(regset->dev); @@ -1188,16 +1211,16 @@ static int debugfs_regset32_show(struct seq_file *s= , void *data) return 0; } =20 -DEFINE_SHOW_ATTRIBUTE(debugfs_regset32); +DEFINE_SHOW_ATTRIBUTE(debugfs_regset); =20 /** - * debugfs_create_regset32 - create a debugfs file that returns register v= alues + * debugfs_create_regset - create a debugfs file that returns register val= ues * @name: a pointer to a string containing the name of the file to create. * @mode: the permission that the file should have * @parent: a pointer to the parent dentry for this file. This should be a * directory dentry if set. If this parameter is %NULL, then the * file will be created in the root of the debugfs filesystem. - * @regset: a pointer to a struct debugfs_regset32, which contains a point= er + * @regset: a pointer to a struct debugfs_regset, which contains a pointer * to an array of register definitions, the array size and the ba= se * address where the register bank is to be found. * @@ -1205,13 +1228,13 @@ DEFINE_SHOW_ATTRIBUTE(debugfs_regset32); * the names and values of a set of 32-bit registers. If the @mode variable * is so set it can be read from. Writing is not supported. */ -void debugfs_create_regset32(const char *name, umode_t mode, +void debugfs_create_regset(const char *name, umode_t mode, struct dentry *parent, - struct debugfs_regset32 *regset) + struct debugfs_regset *regset) { - debugfs_create_file(name, mode, parent, regset, &debugfs_regset32_fops); + debugfs_create_file(name, mode, parent, regset, &debugfs_regset_fops); } -EXPORT_SYMBOL_GPL(debugfs_create_regset32); +EXPORT_SYMBOL_GPL(debugfs_create_regset); =20 #endif /* CONFIG_HAS_IOMEM */ =20 diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index ea2d919fd9c79..247ae4217ea51 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h @@ -26,18 +26,24 @@ struct debugfs_blob_wrapper { unsigned long size; }; =20 -struct debugfs_reg32 { +struct debugfs_reg { char *name; + int size; + int bigendian; unsigned long offset; }; =20 -struct debugfs_regset32 { +#define debugfs_reg32 debugfs_reg + +struct debugfs_regset { const struct debugfs_reg32 *regs; int nregs; void __iomem *base; struct device *dev; /* Optional device for Runtime PM */ }; =20 +#define debugfs_regset32 debugfs_regset + struct debugfs_u32_array { u32 *array; u32 n_elements; @@ -145,12 +151,15 @@ struct dentry *debugfs_create_blob(const char *name, = umode_t mode, struct dentry *parent, struct debugfs_blob_wrapper *blob); =20 -void debugfs_create_regset32(const char *name, umode_t mode, +void debugfs_create_regset(const char *name, umode_t mode, struct dentry *parent, struct debugfs_regset32 *regset); =20 -void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *= regs, +#define debugfs_create_regset32 debugfs_create_regset + +void debugfs_print_regs(struct seq_file *s, const struct debugfs_reg32 *re= gs, int nregs, void __iomem *base, char *prefix); +#define debugfs_print_regs32 debugfs_print_regs =20 void debugfs_create_u32_array(const char *name, umode_t mode, struct dentry *parent, --=20 2.34.1 From nobody Wed Jan 15 07:50:37 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84A32C05023 for ; Wed, 20 Sep 2023 20:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjITUTb (ORCPT ); Wed, 20 Sep 2023 16:19:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229842AbjITUT0 (ORCPT ); Wed, 20 Sep 2023 16:19:26 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2041.outbound.protection.outlook.com [40.107.8.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6E4ACC; Wed, 20 Sep 2023 13:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JiQR1A39DOwSrHwG60xvJbzei7itFLO3QmLlNZNWUpBdxXPtF9CHB3IjAkHo9GKEYGRXBcbqob0vAr7BWtf3uYwohewI3Ie/ZMNM8G3GYyEQdskw5/G9je45xsR8AIHEEg7qh42gzATY3hXftaQeChewG3389v5SWMRT3JqR5SSv5X68vlNtxoAwVMQhwi3tCKiyv17jgLdBYnI94/UJgxlVJORE4FSW+66+R16xlPPKUAZCaarpqWOAfkoy172X46JiyrX+gkz0q+v5ZWgfg1nE5hctwHDctFofVSKzvdlG9/L38SsNt36XgWA3wTx8y8riBiUy67CYaOgcWgp0nA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FFCTSLcpmM+MOulIMZ9dkDY4lIv3hK0bLVZeMw//GpM=; b=jn5QU4CI4rFNAAYxpiD9dHS4Gj+UXsj2PB4CfFNjDXUy64vJfyUVe7QALUGdZMVNGHryQOmATu9XNzSjuaq7+V9ImamaUeGO/W+HM2JnWTikiDu84nfYcMq+sRrRyjyQyAaLqyqk2YJGm+mOHbFm0onRHUIog6gyQX5L9dvX9x04xDNAoOzK1bB8zCduTGPuHRiwuI2Ua7BKofEvgxGb64rh69oSozBomSjqunHtVA1vCIn4xoc/npeDpmbiPOYwp1cztFRvW8iv8RL2FzXvGhaA10uCopCVtmCVXXXfAMMzbgUibU91JIAZgpQyiYixQF3E+txuFcuKE3X0To/J0A== 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=FFCTSLcpmM+MOulIMZ9dkDY4lIv3hK0bLVZeMw//GpM=; b=Pc8BNKkyJPryBqyBXj96+QQaNcBgvsic+9PXk+BNx3awj8iDCNas1BAvB9uNGLXUdobWqwW/Jc2dDWFXrZjAu/yNhmnpi5/82HPq7eURRe7w25hM7pEt9irrho0kZ1JpfO29R67Pncy48xckkd+P8tIZdAjZ2rCL/0fWYfbdZ3A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AS1PR04MB9453.eurprd04.prod.outlook.com (2603:10a6:20b:4da::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Wed, 20 Sep 2023 20:19:14 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6792.026; Wed, 20 Sep 2023 20:19:14 +0000 From: Frank Li To: lkp@intel.com, gregkh@linuxfoundation.org, rafael@kernel.org Cc: Frank.Li@nxp.com, dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev, vkoul@kernel.org Subject: [PATCH v3 2/3] dmaengine: fsl-emda: add debugfs support Date: Wed, 20 Sep 2023 16:18:51 -0400 Message-Id: <20230920201852.3170104-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920201852.3170104-1-Frank.Li@nxp.com> References: <20230920201852.3170104-1-Frank.Li@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR07CA0026.namprd07.prod.outlook.com (2603:10b6:a02:bc::39) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS1PR04MB9453:EE_ X-MS-Office365-Filtering-Correlation-Id: bc913e6e-ef2a-419c-c064-08dbba16dbd9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P8YYf8QUklOKX1QQkMMuZ9Q05UcQD1EBBdTZd+MC8hkiQtbrK3tq0H7MfLn8D1JM+typ/BcGZJ14vT6+rlIqQHEwh1PWPr7UWQoCIP57ThD6fTsUcFFtqH2uLgiFb8K2r2azIscSv+lYLrYKG33/svz740bVhv4y7PqxIKu3wgZ++2GYyvT0Lfw+6fGow6UfnuqQUQnhvnidsRC3ztsFqxaAHpAz4Hnr8l7JXd6TTp8EJlSnSc6bpOxUr2s47grBj1xon6Xdy/ChRyr/DbdlimBpyO73f+l4CRZVgrnQMjRAlDq05wR86P9IQKGyt7cX75Me2MQASb1kzOtOAS+A20mCg3SZk/y4gTXVXMbq8XDWHD47CLRKUuX2uaquixrTj8M0YemuL9c9Q05fqaeCtyJGKunzGdXsFzh5MZcnmI88wHWBaY32vUuTM6yQhOHfVTMqeXAS22UD0gLhRcSa4OJNr7inhbEwd1OWdzntnG1QW3KgfBeu0Jh4p2q77ylxOxljqyKovU79+wI0lk0002p9InC/q8gQM50Xqo/o9db3HWKeVjRTkfskkqBoXvgAu1+lFRx/0ME40eOD5OTcUWqzCtX1mez/h+sCnlyV7grh54/psxYLQQhIXEUwqPqz X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(366004)(396003)(376002)(346002)(451199024)(1800799009)(186009)(6512007)(52116002)(6486002)(6506007)(6666004)(38350700002)(86362001)(38100700002)(83380400001)(36756003)(2616005)(1076003)(26005)(66476007)(316002)(66946007)(66556008)(41300700001)(2906002)(5660300002)(8936002)(8676002)(4326008)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?2nW48WEDnXGB2zu9zG5c1DbTvKG11E1wUds933ifFiyssu4e2IIt3pVTjBJ9?= =?us-ascii?Q?7v3RyDeCIpihPYsPhbrD64xzzkglJt32bPLiPdcotl1YQTTRzWw8kDTzFt9o?= =?us-ascii?Q?ZXY9JANJkl9imZzya5Yj7Bwn2OxH/L7bwuMBXdAuSVvpAJT+CGqGVh4Efbps?= =?us-ascii?Q?Y8mVhrIMfv5ALrZwmcTEykdyYBS63bFYCcu2BidEvv5ApU6a4gqNEfH1SXlf?= =?us-ascii?Q?IWPMLx4UwVRg4e8cjSe66oCqs5dihVkKhB8EVWOCP+LhoNN6AXZPyU+jujA2?= =?us-ascii?Q?A8XXhPgVAQfuNP/la0UGh2G5zQMGRCCJaoR93RCeZhRUQntyCLo0o9KX4K6z?= =?us-ascii?Q?6NWVNun7hIZDg/hLfPYmcIgy9I85oMBfFXFqa0PxhrsoFt1AO0/7yA/QIsCk?= =?us-ascii?Q?zwLQSaR/rgITpKjwvbKW0sip93PRoP7pAzrToDuxH5dhU7UIrIcwMDuxW0eN?= =?us-ascii?Q?LI8T9kFenEuB+UN8ctrMMkGDM/zniN06qRtVzQfthAOJ8uM/Xqf6aL8HbQ70?= =?us-ascii?Q?QBWSccau83RexSI/bhzGET6wEa+ndfmArD77v57WXZeutJz1TdUq4d141jRl?= =?us-ascii?Q?3Z7c/Uhs/8mg/tDybWQl06yGnqh7tJeFvajCv0VgE9M9+UmGhIy8CD3fkdNT?= =?us-ascii?Q?6IqEzmaA0SEQrOOBqcxJdW0j9DcKACoRfB+JwW7MytDonXXBeHhCkcLAD0QZ?= =?us-ascii?Q?6Cn+IIljDhxIqqvyBdB7N0VvARCf0neCj4aXjXrKaDQG1KxEifOgGBRDh+Pt?= =?us-ascii?Q?gKiNIUAfbgxSABNxLSVwq3OeXrPaTNQKbG0rTJY0VHa9XHAygowzSfRxgUmV?= =?us-ascii?Q?uQBAxsDJNSPYsSgAs9wWAH/lDXvVIcB55DM6w3w/tN8H3XnG/A1JhLcaD6Ac?= =?us-ascii?Q?9g8y6ivJ2S4M1OmXbp0iBsKRi+RgerNT7J4OEEzGhEQVbWZcf4UEKLzGUgzw?= =?us-ascii?Q?yQ8wTuBalSiaY3Ih881mOafQ/xyMTm3EzwgsgKQ/7Qg0thhmUVxr/EnaeLST?= =?us-ascii?Q?Zm67E9YslnuXoetgt2JLaSv/F3eFnpftoqnN6GPXtkWHwblI3vx8xF4Gixq8?= =?us-ascii?Q?+zIW0CBJ213tiYCW//fdQ0lXOKqc8h5dGXol6GmPeDjaaA8AgebGdjuor9t2?= =?us-ascii?Q?JPivwJT2G7ho0/5rRhr155LBvPjdOxnJJKon3iSeX24e3Fkc7UyQeQZOKKep?= =?us-ascii?Q?lje7IRO0dKeQtHScygzitBC2FlWMW+Znmq72lP/HJOrpTjkUvWwzNnDD9Zqq?= =?us-ascii?Q?/SpzKL43ocYqHZ68Za2K2xadNhRqfDBL+e9iTQBkGPwglwfUXaxYMU9gNM99?= =?us-ascii?Q?acRH/I/m1hnw5ujBzj+/NFmV86TpwfJvki6jA9LMOHtByxff2x0RwQWx0XUb?= =?us-ascii?Q?zoXj1ZgMyUP1ywX0pJb2TP/8UHFj7dCuTrMb+K4Q97eT9IQSGJWo4jpR/Za0?= =?us-ascii?Q?n68esdJPpoP027RcY/U4zhEFhAsTSP2vJeWplAApPf1AaVybC5VdgwE0gxUH?= =?us-ascii?Q?0Wim/MqOQL3A2qFdLB8Qrbp6REfNz35EhPtGTxgcLPu/jsq8ICtnLoQFISig?= =?us-ascii?Q?aFQOcbToYHzN6UKBQxJWiPloSQjhA1bnVlkdY6O7?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc913e6e-ef2a-419c-c064-08dbba16dbd9 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2023 20:19:14.5268 (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: vmq7526wvEPU6nhzlOiQ3jslfWyeWezFbGetKpfXYd5C4ZU24omV/ovedGlzBviYUV9HRn3zF1kfumGu9I0aCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9453 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add debugfs support to fsl-edma to enable dumping of register states. Signed-off-by: Frank Li --- drivers/dma/Makefile | 5 +- drivers/dma/fsl-edma-common.h | 8 ++ drivers/dma/fsl-edma-debugfs.c | 200 +++++++++++++++++++++++++++++++++ drivers/dma/fsl-edma-main.c | 2 + 4 files changed, 213 insertions(+), 2 deletions(-) create mode 100644 drivers/dma/fsl-edma-debugfs.c diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index 83553a97a010e..a51c6397bcad0 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -31,10 +31,11 @@ obj-$(CONFIG_DW_AXI_DMAC) +=3D dw-axi-dmac/ obj-$(CONFIG_DW_DMAC_CORE) +=3D dw/ obj-$(CONFIG_DW_EDMA) +=3D dw-edma/ obj-$(CONFIG_EP93XX_DMA) +=3D ep93xx_dma.o +fsl-edma-debugfs-$(CONFIG_DEBUG_FS) :=3D fsl-edma-debugfs.o obj-$(CONFIG_FSL_DMA) +=3D fsldma.o -fsl-edma-objs :=3D fsl-edma-main.o fsl-edma-common.o +fsl-edma-objs :=3D fsl-edma-main.o fsl-edma-common.o $(fsl-edma-debugfs-y) obj-$(CONFIG_FSL_EDMA) +=3D fsl-edma.o -mcf-edma-objs :=3D mcf-edma-main.o fsl-edma-common.o +mcf-edma-objs :=3D mcf-edma-main.o fsl-edma-common.o $(fsl-edma-debugfs-y) obj-$(CONFIG_MCF_EDMA) +=3D mcf-edma.o obj-$(CONFIG_FSL_QDMA) +=3D fsl-qdma.o obj-$(CONFIG_FSL_RAID) +=3D fsl_raid.o diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index 3cc0cc8fc2d05..ecaba563d4897 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -336,4 +336,12 @@ void fsl_edma_free_chan_resources(struct dma_chan *cha= n); void fsl_edma_cleanup_vchan(struct dma_device *dmadev); void fsl_edma_setup_regs(struct fsl_edma_engine *edma); =20 +#ifdef CONFIG_DEBUG_FS +void fsl_edma_debugfs_on(struct fsl_edma_engine *edma); +#else +static inline void fsl_edma_debugfs_on(struct dw_edma *edma) +{ +} +#endif /* CONFIG_DEBUG_FS */ + #endif /* _FSL_EDMA_COMMON_H_ */ diff --git a/drivers/dma/fsl-edma-debugfs.c b/drivers/dma/fsl-edma-debugfs.c new file mode 100644 index 0000000000000..99f34198dae05 --- /dev/null +++ b/drivers/dma/fsl-edma-debugfs.c @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include + +#include "fsl-edma-common.h" + +#define fsl_edma_debugfs_reg(reg, b, _s, __name) \ +do { reg->name =3D __stringify(__name); \ + reg->offset =3D offsetof(struct _s, __name); \ + reg->size =3D sizeof(((struct _s *)0)->__name); \ + reg->bigendian =3D b; \ + reg++; \ +} while (0) + +#define fsl_edma_debugfs_regv1(reg, edma, __name) \ +do { reg->name =3D __stringify(__name); \ + reg->offset =3D edma->regs.__name - edma->membase;\ + reg->bigendian =3D edma->big_endian; \ + reg++; \ +} while (0) + +static void fsl_edma_debufs_tcdreg(struct fsl_edma_chan *chan, struct dent= ry *dir) +{ + struct debugfs_regset *regset; + struct debugfs_reg *reg; + struct device *dev; + int be; + + be =3D chan->edma->big_endian; + + dev =3D &chan->pdev->dev; + + regset =3D devm_kzalloc(dev, sizeof(*regset), GFP_KERNEL); + if (!regset) + return; + + regset->dev =3D dev; + regset->base =3D chan->tcd; + + /* sizeof(struct fsl_edma_hw_tcd)/sizeof(u16) is enough for hold all regi= sters */ + reg =3D devm_kcalloc(dev, sizeof(struct fsl_edma_hw_tcd)/sizeof(u16), + sizeof(*reg), GFP_KERNEL); + + if (!reg) + return; + + regset->regs =3D reg; + + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, saddr); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, soff); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, attr); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, nbytes); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, slast); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, daddr); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, doff); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, citer); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, dlast_sga); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, csr); + fsl_edma_debugfs_reg(reg, be, fsl_edma_hw_tcd, biter); + + regset->nregs =3D reg - regset->regs; + + debugfs_create_regset("tcd", 0444, dir, regset); +} + +static void fsl_edma3_debufs_chan(struct fsl_edma_chan *chan, struct dentr= y *entry) +{ + struct debugfs_regset *regset; + struct debugfs_reg *reg; + struct device *dev; + int be; + + be =3D chan->edma->big_endian; + + dev =3D &chan->pdev->dev; + + regset =3D devm_kzalloc(dev, sizeof(*regset), GFP_KERNEL); + if (!regset) + return; + + regset->dev =3D dev; + + reg =3D devm_kcalloc(dev, sizeof(struct fsl_edma3_ch_reg)/sizeof(u32), + sizeof(*reg), GFP_KERNEL); + + if (!reg) + return; + + regset->base =3D chan->tcd; + regset->base -=3D offsetof(struct fsl_edma3_ch_reg, tcd); + + regset->regs =3D reg; + + fsl_edma_debugfs_reg(reg, be, fsl_edma3_ch_reg, ch_csr); + fsl_edma_debugfs_reg(reg, be, fsl_edma3_ch_reg, ch_es); + fsl_edma_debugfs_reg(reg, be, fsl_edma3_ch_reg, ch_int); + fsl_edma_debugfs_reg(reg, be, fsl_edma3_ch_reg, ch_sbr); + fsl_edma_debugfs_reg(reg, be, fsl_edma3_ch_reg, ch_pri); + fsl_edma_debugfs_reg(reg, be, fsl_edma3_ch_reg, ch_mux); + fsl_edma_debugfs_reg(reg, be, fsl_edma3_ch_reg, ch_mattr); + + regset->nregs =3D reg - regset->regs; + debugfs_create_regset("regs", 0444, entry, regset); + + fsl_edma_debufs_tcdreg(chan, entry); +} + +static void fsl_edma3_debugfs_init(struct fsl_edma_engine *edma) +{ + struct fsl_edma_chan *chan; + struct dentry *dir; + int i; + + for (i =3D 0; i < edma->n_chans; i++) { + if (edma->chan_masked & BIT(i)) + continue; + + chan =3D &edma->chans[i]; + dir =3D debugfs_create_dir(chan->chan_name, edma->dma_dev.dbg_dev_root); + + fsl_edma3_debufs_chan(chan, dir); + } + +} + +static void fsl_edma_debugfs_init(struct fsl_edma_engine *edma) +{ + struct debugfs_regset *regset; + struct fsl_edma_chan *chan; + struct debugfs_reg *reg; + struct dentry *dir; + struct device *dev; + int i; + + dev =3D edma->dma_dev.dev; + + regset =3D devm_kzalloc(dev, sizeof(*regset), GFP_KERNEL); + if (!regset) + return; + + regset->dev =3D dev; + + reg =3D devm_kcalloc(dev, sizeof(struct edma_regs)/sizeof(void *), sizeof= (*reg), GFP_KERNEL); + + if (!reg) + return; + + regset->regs =3D reg; + regset->base =3D edma->membase; + + fsl_edma_debugfs_regv1(reg, edma, cr); + fsl_edma_debugfs_regv1(reg, edma, es); + fsl_edma_debugfs_regv1(reg, edma, erqh); + fsl_edma_debugfs_regv1(reg, edma, erql); + fsl_edma_debugfs_regv1(reg, edma, eeih); + fsl_edma_debugfs_regv1(reg, edma, eeil); + fsl_edma_debugfs_regv1(reg, edma, seei); + fsl_edma_debugfs_regv1(reg, edma, ceei); + fsl_edma_debugfs_regv1(reg, edma, serq); + fsl_edma_debugfs_regv1(reg, edma, cerq); + fsl_edma_debugfs_regv1(reg, edma, cint); + fsl_edma_debugfs_regv1(reg, edma, cerr); + fsl_edma_debugfs_regv1(reg, edma, ssrt); + fsl_edma_debugfs_regv1(reg, edma, cdne); + fsl_edma_debugfs_regv1(reg, edma, inth); + fsl_edma_debugfs_regv1(reg, edma, errh); + fsl_edma_debugfs_regv1(reg, edma, errl); + + regset->nregs =3D reg - regset->regs; + + debugfs_create_regset("regs", 0444, edma->dma_dev.dbg_dev_root, regset); + + for (i =3D 0; i < edma->n_chans; i++) { + if (edma->chan_masked & BIT(i)) + continue; + + chan =3D &edma->chans[i]; + dir =3D debugfs_create_dir(chan->chan_name, edma->dma_dev.dbg_dev_root); + + fsl_edma_debufs_tcdreg(chan, dir); + } +} + +void fsl_edma_debugfs_on(struct fsl_edma_engine *edma) +{ + if (!debugfs_initialized()) + return; + + debugfs_create_bool("big_endian", 0444, edma->dma_dev.dbg_dev_root, &edma= ->big_endian); + debugfs_create_x64("chan_mask", 0444, edma->dma_dev.dbg_dev_root, &edma->= chan_masked); + debugfs_create_x32("n_chans", 0444, edma->dma_dev.dbg_dev_root, &edma->n_= chans); + + if (edma->drvdata->flags & FSL_EDMA_DRV_SPLIT_REG) + fsl_edma3_debugfs_init(edma); + else + fsl_edma_debugfs_init(edma); +} + + diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 63d48d046f046..029a72872821d 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -612,6 +612,8 @@ static int fsl_edma_probe(struct platform_device *pdev) if (!(drvdata->flags & FSL_EDMA_DRV_SPLIT_REG)) edma_writel(fsl_edma, EDMA_CR_ERGA | EDMA_CR_ERCA, regs->cr); =20 + fsl_edma_debugfs_on(fsl_edma); + return 0; } =20 --=20 2.34.1 From nobody Wed Jan 15 07:50:37 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2A4EC04AB7 for ; Wed, 20 Sep 2023 20:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjITUTe (ORCPT ); Wed, 20 Sep 2023 16:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjITUT3 (ORCPT ); Wed, 20 Sep 2023 16:19:29 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2041.outbound.protection.outlook.com [40.107.8.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0DAEAB; Wed, 20 Sep 2023 13:19:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oGipreT8gJOMWE7Zw1+9SYCy0IbzObS3Dk+ESZNSdmAUieT7vqQFZg+ziRkZnvjUfN+qgGPP4ppkXmLNU/dPLswDcnKU13/q1Gyp9zbWyUsMe5Kw077wyZnsZRLIoO80JPcENUWlTwrtHTEZVcMSxM8MM3UTUrrcE3IUxFg8dOimOiopfuSWeR6MR5mRel3gOXm5vOC9V6QsBiojD+WqC1GMMFoZIf2i1NsIJV5Ec0mHjV7I2bgLLKuphJv8KiHEgx87WYvHVFqD7rAEaZLLUtzwKew5g3j2IB5oHhjKIFoil8vwbqWHD0b9QKmGjcWyoMXgbI3MwxmHxkE2kXLR7g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0vgbk7kH87jFTITs4CUnmnZveS7YfRb7Z54TRYp/gSk=; b=l5NY3NSXmZ6JN+MDtogdg0fTzlvy3eORpDtEsfIWkzNrCmFs8Mb5w1XMwMOrRL+sUAbLQbRfXP8AGNRrebVYqpVoVCWQI0PmSJSP41h5WaZkBUrPhvc3Bxjhov4oqoXSBr0uegFsq2NbmC9DXBUIv/tTA3dnIPfBue7NN5+v7orkkxi7H67MV2jTWrrKGwzAQVlz3/lZkzswrNUbcW5FEmdONiwqoLIuP89jy7z43MNNwnKUqjUZ7rvTzN4jRLCCYzbMtfjDQJqxBCAhF2f8tT3k6Z/6NoZlTLfGG28wcxqkEP7sy34N+ZeXF5Opa3Z/zphvb7EMtv0fhE8F3uzAsw== 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=0vgbk7kH87jFTITs4CUnmnZveS7YfRb7Z54TRYp/gSk=; b=b65r8V+joudWXowC1YcNKaBSC67wPy2CDGbREQ53MpccB7POJvPOzROVzH6tzbCzibhYFGaqop6OMX0mm2X7COLrVjyb0/8YfbBGGAj9CudsuHGeDvlZIzAg8tQCO1PvCnoUT0vPxTPEnIWbl/1UCKRKJWx50r7Smqk3T0+902A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AS1PR04MB9453.eurprd04.prod.outlook.com (2603:10a6:20b:4da::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Wed, 20 Sep 2023 20:19:17 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6792.026; Wed, 20 Sep 2023 20:19:17 +0000 From: Frank Li To: lkp@intel.com, gregkh@linuxfoundation.org, rafael@kernel.org Cc: Frank.Li@nxp.com, dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev, vkoul@kernel.org Subject: [PATCH v3 3/3] dmaengine: fsl-edma: add trace event support Date: Wed, 20 Sep 2023 16:18:52 -0400 Message-Id: <20230920201852.3170104-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920201852.3170104-1-Frank.Li@nxp.com> References: <20230920201852.3170104-1-Frank.Li@nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BYAPR07CA0026.namprd07.prod.outlook.com (2603:10b6:a02:bc::39) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS1PR04MB9453:EE_ X-MS-Office365-Filtering-Correlation-Id: 11643bb1-8e2f-4600-1d54-08dbba16dd63 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mEWaNTsm3t0+qIi0aGd+3TIRxUDsEEPX1EpQTfESy/apJZ1b/f8xJ3t3B3f1oI4dDmAlpxHIsIY1XVsInPy3B4V5zKwCglcox2MYUr5Zbova1HPaUIRB4+RW+Q5GV3QsmDnOEP5XTSWaQJFKquucMhAqOpwPr3IZT+I9QB1XFZglMOg2n8CSDHemxkx7gYAans3Rq1R3m6RkRAGg+FXGm1KrfrQawGITiOZx5pUKa1kxVf5az72SoBWxydnh+Pgf32gzXsVncV5lKJEwGguNMm9VIpmKEazDHdKEDrOMQhopk7Y55CaO7pYvWvwQXxUY9h48pLJ8UGwwLOa1uzRJy7YLVt+Lb5MP+61/4vxSv+55jJ6O5AUnEJHyB2/oa+yL7CdOUPRvx5zoTLTDhTRWNbXvg5MwtzR1FW0uTw5FuC0AzggShEF3kkpplXTTq4uceh1+Yb2DQJpQZgPJUJ6K4jvPSklTT3Ct+MUGCvU4pDPl4tG+/qzdP8oSDEffZMJDyplPzsuPnp7aGes/Pm5MokSB+colBrFNtRUsQ+xJrHm/xaDEo9wzbDAZQThaayT6JgNx8CoMXRiW4MIKZ4AnrDZEI1Y/hyGEF60dY3SyUhfkxZZOTA8BQ+ebjTYaSs/K X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(366004)(396003)(376002)(346002)(451199024)(1800799009)(186009)(6512007)(52116002)(6486002)(6506007)(6666004)(38350700002)(86362001)(38100700002)(83380400001)(36756003)(2616005)(1076003)(26005)(66476007)(316002)(66946007)(66556008)(41300700001)(2906002)(5660300002)(8936002)(8676002)(4326008)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BpCMY4aWBVKnXMjQXB0SGIiOZv6B9Lo2yAF3arrmF4v7t0c6QIv9U7Qb1qH/?= =?us-ascii?Q?c720Wpfc5RcO+RCpefso9HrDoNUhN3p3QcgOjA4EDRk5AXCIe9dFx0dtbTdK?= =?us-ascii?Q?dwOGTxBOIj76YVRXOSmnIQuxSFLsbnyEN56q/LBJw0zyQnlduGt+hXd/sEiY?= =?us-ascii?Q?DejN3kT5HnHx8OfOcq5bQPWoeHiIxrRaSRZB/pzmgmjOxILnSBnGPSeJDL9g?= =?us-ascii?Q?oaM+iSLoEHaig3TtVxTqh43MBfPVAp0AGbFD8gKrimMIrw2Iw3xqa4xOJqni?= =?us-ascii?Q?+1RGlp+tSx96TpfM1JPrqUabi+b3XC/FpCqdMLWeVKW33Pr3671oqkkH9rWu?= =?us-ascii?Q?6U6mSGXhdrVa5pDOvjqS81LeKGcpKeug/qdNnbFBUVV5thdGKy0ix7mSLxWj?= =?us-ascii?Q?6cB0pC2+K8eqsmZRrBNpxPT2SjvM2G3TAzUgZ3o3IZCN2DHrpKVq6Zyw6SAr?= =?us-ascii?Q?IpD6tZEkMxzn7br3oeTMFYQkl2r8AXQBb/QVci5gl6w791Ms6keQmbsQZGm9?= =?us-ascii?Q?lyZW5KVsZoquJ+RedeW38kYU+eWlFEeRroO2B9DjzC7Hhv1zhplm3FHKXmHq?= =?us-ascii?Q?mtn0pS52s92NuidSWOgAPqKQ5YiTU/DLQeN2LpnUVBLHabLus348AsLKhRrG?= =?us-ascii?Q?dZDkVZUVkivHiik8jXHZEoAX6+npYNJ+EB/2X7iGkxU2XcHohN5haergKW8f?= =?us-ascii?Q?hpEGgwffdm3U3xve0Af7KsyzNFNtBP59kR5YHTCSuAFHl98wDc5D6XcFpiy8?= =?us-ascii?Q?vaYstzyccM172V8oSjH4/8G9xGLlKsQ7HAnIkKYO43YDEL/ud+R0Du2yE3cM?= =?us-ascii?Q?yW6jV2EOpwKyzagtjynTQ4KHGDCYbnGX1TA/4SVGZwQVlWlR0CjhrSwfULd3?= =?us-ascii?Q?mqoLnbvgIjgNQGUjmrTHZRYGzqDZ4WpeLk4DicXyD/2II5VeIZi8LswmGhPB?= =?us-ascii?Q?FEpTryF6TkleJ/OFxWWyYYFhWxgi+2UkpVWMv3FPK37q5JEw4rR4cPd+R3Ru?= =?us-ascii?Q?+FRhXJO5ZVD67MVZA8gCriVMAOE7lH6awpl5S8oN6fwIB7AYpD5wU3tk69e5?= =?us-ascii?Q?VftmNMCiL0WnlgQ0+6Syd8y/oStyf5hwaN15M+xxYoZYoD3i4CC4eO7P2n/v?= =?us-ascii?Q?DRHw4uB7ZkjqMx7/KSktS3ItUIHIUPfKAwDIJPKki9n1E9v89+DTwzQO6ukQ?= =?us-ascii?Q?fqUQGytTvro9icudktzwdJaeIjIB/B9JzdTUI6we3R/INvV79g/Z9Lhlypjp?= =?us-ascii?Q?CuGQRZIPPGLsvMo8jp6bch4L+V5cPTl+MvLjKNtvFIgimhDOAyNnLB4g9oJ+?= =?us-ascii?Q?no7D6vzYcogwG1zAn2v0y27Zu3VaP6sNTlXUAzE0ycnq/eDY8vawrmCzwiOK?= =?us-ascii?Q?fZKBYQDglhC3soGE8yaMEycq86A2jrqW8qGRlKQvXnHFLIm5FmmaKtc1+8VZ?= =?us-ascii?Q?9TuXUA1UXk3peRGfz0GtK968v3E3P+i0TtH5OXrYXlypQDKJ7wwVynKQ3X+a?= =?us-ascii?Q?gDk3Jf9B50H7fUSWIIG9qnfNrlz7Q3ckbMbVaDBEWmPM6ZRrqCNUBUMhEU0v?= =?us-ascii?Q?1JtAoiOdsTFZ9hY0L37As8RZZ5KMYQ3oIrWSq5wD?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11643bb1-8e2f-4600-1d54-08dbba16dd63 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2023 20:19:17.0896 (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: 5x2U3oNtM5IHpmtWZR52ZO7oMOPWheK9Rt3wkgWwGd9yK413faKYUyd1a99A8hgYNa7cHXTQd/BESxSR5ALg3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9453 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Implement trace event support to enhance logging functionality for register access and the transfer control descriptor (TCD) context. This will enable more comprehensive monitoring and analysis of system activities Signed-off-by: Frank Li --- drivers/dma/Makefile | 6 +- drivers/dma/fsl-edma-common.c | 2 + drivers/dma/fsl-edma-common.h | 29 +++++++- drivers/dma/fsl-edma-trace.c | 4 + drivers/dma/fsl-edma-trace.h | 134 ++++++++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+), 6 deletions(-) create mode 100644 drivers/dma/fsl-edma-trace.c create mode 100644 drivers/dma/fsl-edma-trace.h diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index a51c6397bcad0..40b2dd554e5dc 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -32,10 +32,12 @@ obj-$(CONFIG_DW_DMAC_CORE) +=3D dw/ obj-$(CONFIG_DW_EDMA) +=3D dw-edma/ obj-$(CONFIG_EP93XX_DMA) +=3D ep93xx_dma.o fsl-edma-debugfs-$(CONFIG_DEBUG_FS) :=3D fsl-edma-debugfs.o +CFLAGS_fsl-edma-trace.o :=3D -I$(src) +fsl-edma-trace-$(CONFIG_TRACING) :=3D fsl-edma-trace.o obj-$(CONFIG_FSL_DMA) +=3D fsldma.o -fsl-edma-objs :=3D fsl-edma-main.o fsl-edma-common.o $(fsl-edma-debugfs-y) +fsl-edma-objs :=3D fsl-edma-main.o fsl-edma-common.o $(fsl-edma-debugfs-y)= ${fsl-edma-trace-y} obj-$(CONFIG_FSL_EDMA) +=3D fsl-edma.o -mcf-edma-objs :=3D mcf-edma-main.o fsl-edma-common.o $(fsl-edma-debugfs-y) +mcf-edma-objs :=3D mcf-edma-main.o fsl-edma-common.o $(fsl-edma-debugfs-y)= ${fsl-edma-trace-y} obj-$(CONFIG_MCF_EDMA) +=3D mcf-edma.o obj-$(CONFIG_FSL_QDMA) +=3D fsl-qdma.o obj-$(CONFIG_FSL_RAID) +=3D fsl_raid.o diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index a0f5741abcc47..0182e2695fdc0 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -521,6 +521,8 @@ void fsl_edma_fill_tcd(struct fsl_edma_chan *fsl_chan, csr |=3D EDMA_TCD_CSR_START; =20 tcd->csr =3D cpu_to_le16(csr); + + trace_edma_fill_tcd(fsl_chan->edma, tcd); } =20 static struct fsl_edma_desc *fsl_edma_alloc_desc(struct fsl_edma_chan *fsl= _chan, diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index ecaba563d4897..a9e27110ac7d7 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -234,6 +234,9 @@ struct fsl_edma_engine { edma_writel(chan->edma, val, \ (void __iomem *)&(container_of(chan->tcd, struct fsl_edma3_ch_reg, tc= d)->__name)) =20 +/* Need after struct defination */ +#include "fsl-edma-trace.h" + /* * R/W functions for big- or little-endian registers: * The eDMA controller's endian is independent of the CPU core's endian. @@ -242,18 +245,30 @@ struct fsl_edma_engine { */ static inline u32 edma_readl(struct fsl_edma_engine *edma, void __iomem *a= ddr) { + u32 val; + if (edma->big_endian) - return ioread32be(addr); + val =3D ioread32be(addr); else - return ioread32(addr); + val =3D ioread32(addr); + + trace_edma_readl(edma, addr, val); + + return val; } =20 static inline u16 edma_readw(struct fsl_edma_engine *edma, void __iomem *a= ddr) { + u16 val; + if (edma->big_endian) - return ioread16be(addr); + val =3D ioread16be(addr); else - return ioread16(addr); + val =3D ioread16(addr); + + trace_edma_readw(edma, addr, val); + + return val; } =20 static inline void edma_writeb(struct fsl_edma_engine *edma, @@ -264,6 +279,8 @@ static inline void edma_writeb(struct fsl_edma_engine *= edma, iowrite8(val, (void __iomem *)((unsigned long)addr ^ 0x3)); else iowrite8(val, addr); + + trace_edma_writeb(edma, addr, val); } =20 static inline void edma_writew(struct fsl_edma_engine *edma, @@ -274,6 +291,8 @@ static inline void edma_writew(struct fsl_edma_engine *= edma, iowrite16be(val, (void __iomem *)((unsigned long)addr ^ 0x2)); else iowrite16(val, addr); + + trace_edma_writew(edma, addr, val); } =20 static inline void edma_writel(struct fsl_edma_engine *edma, @@ -283,6 +302,8 @@ static inline void edma_writel(struct fsl_edma_engine *= edma, iowrite32be(val, addr); else iowrite32(val, addr); + + trace_edma_writel(edma, addr, val); } =20 static inline struct fsl_edma_chan *to_fsl_edma_chan(struct dma_chan *chan) diff --git a/drivers/dma/fsl-edma-trace.c b/drivers/dma/fsl-edma-trace.c new file mode 100644 index 0000000000000..28300ad80bb75 --- /dev/null +++ b/drivers/dma/fsl-edma-trace.c @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 + +#define CREATE_TRACE_POINTS +#include "fsl-edma-common.h" diff --git a/drivers/dma/fsl-edma-trace.h b/drivers/dma/fsl-edma-trace.h new file mode 100644 index 0000000000000..9dd08a42ad54a --- /dev/null +++ b/drivers/dma/fsl-edma-trace.h @@ -0,0 +1,134 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2023 NXP. + */ + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM fsl_edma + +#if !defined(__LINUX_FSL_EDMA_TRACE) || defined(TRACE_HEADER_MULTI_READ) +#define __LINUX_FSL_EDMA_TRACE + +#include +#include + +DECLARE_EVENT_CLASS(edma_log_io, + TP_PROTO(struct fsl_edma_engine *edma, void __iomem *addr, u32 value), + TP_ARGS(edma, addr, value), + TP_STRUCT__entry( + __field(struct fsl_edma_engine *, edma) + __field(void __iomem *, addr) + __field(u32, value) + ), + TP_fast_assign( + __entry->edma =3D edma; + __entry->addr =3D addr; + __entry->value =3D value; + ), + TP_printk("offset %08x: value %08x", + (u32)(__entry->addr - __entry->edma->membase), __entry->value) +); + +DEFINE_EVENT(edma_log_io, edma_readl, + TP_PROTO(struct fsl_edma_engine *edma, void __iomem *addr, u32 value), + TP_ARGS(edma, addr, value) +); + +DEFINE_EVENT(edma_log_io, edma_writel, + TP_PROTO(struct fsl_edma_engine *edma, void __iomem *addr, u32 value), + TP_ARGS(edma, addr, value) +); + +DEFINE_EVENT(edma_log_io, edma_readw, + TP_PROTO(struct fsl_edma_engine *edma, void __iomem *addr, u32 value), + TP_ARGS(edma, addr, value) +); + +DEFINE_EVENT(edma_log_io, edma_writew, + TP_PROTO(struct fsl_edma_engine *edma, void __iomem *addr, u32 value), + TP_ARGS(edma, addr, value) +); + +DEFINE_EVENT(edma_log_io, edma_readb, + TP_PROTO(struct fsl_edma_engine *edma, void __iomem *addr, u32 value), + TP_ARGS(edma, addr, value) +); + +DEFINE_EVENT(edma_log_io, edma_writeb, + TP_PROTO(struct fsl_edma_engine *edma, void __iomem *addr, u32 value), + TP_ARGS(edma, addr, value) +); + +DECLARE_EVENT_CLASS(edma_log_tcd, + TP_PROTO(struct fsl_edma_engine *edma, struct fsl_edma_hw_tcd *tcd), + TP_ARGS(edma, tcd), + TP_STRUCT__entry( + __field(struct fsl_edma_engine *, edma) + __field(u32, saddr) + __field(u16, soff) + __field(u16, attr) + __field(u32, nbytes) + __field(u32, slast) + __field(u32, daddr) + __field(u16, doff) + __field(u16, citer) + __field(u32, dlast_sga) + __field(u16, csr) + __field(u16, biter) + + ), + TP_fast_assign( + __entry->edma =3D edma; + __entry->saddr =3D le32_to_cpu(tcd->saddr), + __entry->soff =3D le16_to_cpu(tcd->soff), + __entry->attr =3D le16_to_cpu(tcd->attr), + __entry->nbytes =3D le32_to_cpu(tcd->nbytes), + __entry->slast =3D le32_to_cpu(tcd->slast), + __entry->daddr =3D le32_to_cpu(tcd->daddr), + __entry->doff =3D le16_to_cpu(tcd->doff), + __entry->citer =3D le16_to_cpu(tcd->citer), + __entry->dlast_sga =3D le32_to_cpu(tcd->dlast_sga), + __entry->csr =3D le16_to_cpu(tcd->csr), + __entry->biter =3D le16_to_cpu(tcd->biter); + ), + TP_printk("\n=3D=3D=3D=3D TCD =3D=3D=3D=3D=3D\n" + " saddr: 0x%08x\n" + " soff: 0x%04x\n" + " attr: 0x%04x\n" + " nbytes: 0x%08x\n" + " slast: 0x%08x\n" + " daddr: 0x%08x\n" + " doff: 0x%04x\n" + " citer: 0x%04x\n" + " dlast: 0x%08x\n" + " csr: 0x%04x\n" + " biter: 0x%04x\n", + __entry->saddr, + __entry->soff, + __entry->attr, + __entry->nbytes, + __entry->slast, + __entry->daddr, + __entry->doff, + __entry->citer, + __entry->dlast_sga, + __entry->csr, + __entry->biter) +); + +DEFINE_EVENT(edma_log_tcd, edma_fill_tcd, + TP_PROTO(struct fsl_edma_engine *edma, struct fsl_edma_hw_tcd *tcd), + TP_ARGS(edma, tcd) +); + +#endif + +/* this part must be outside header guard */ + +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . + +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE fsl-edma-trace + +#include --=20 2.34.1