From patchwork Tue Feb 27 17:21:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13574158 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2070.outbound.protection.outlook.com [40.107.22.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5C874EB23; Tue, 27 Feb 2024 17:22:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054538; cv=fail; b=QmNfhGKwhepzQ3Xpn9z6yvOa5My9CoqA54EIgUYo9Z7tm+L1ZxpAqb9pfT9QptGxE5a3miWvFvZ0kYWCSuLMIpZwbRS9LuhS8e4qbsT2TfEXZkSYDbWPX/UhTwNeNadMMu/o+6WA2zbjzQqO1yM0y5lwcHroec0uHqeVrSa5PS8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054538; c=relaxed/simple; bh=r+SX1BIbt/a8XXIeUpEhiy0sFQzztcqic+7HKpVi/bY=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=neJ38x96EBTEpEt9As2V3v7CYP9/tIbeJiX961M8IHdiaqx0tCzzhPzicj0DI6BWe4T9tWw6XM81+F0SUr1MP2mk6NF3XyUk1f0GJMS90K76yTohAT8Gob8Q/WidUkZaQ5Q9+7BWAhxeP9d/7n7+CdTmffGEHL0GQ77mPeq4gFk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=hOZ53IHf; arc=fail smtp.client-ip=40.107.22.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="hOZ53IHf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oMm7C/0q/z53RCQF8LxWNpkX53U+23LcPOOIvum5xlIZSDKmmEuP1scYmAYm20hC16+iyXHBYgA0HXugFB4PpEVbso/8z7gwVyr2NT3bYuGVKlXHx/qRCEnnZr4cUxJEe9J9SfuvjS8+i/FaDdFjaKRr/0zfpDqvwkKv7YcjicentKFcD+UTqbQ0dB+bkxx7fXQgFYlYvArqCan+osT269boAmgONMXkwnQUx97Nek/rqQeVfBktVkLVxA6dZM0M/QzSn3l/2H4WoNarC5I9hY+eZ3z2cGLqc47dJOhhmGAUkKWO+iwK/lE4iIjRMr5Dg2LwtBVu/nIXPwTHTno9Nw== 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=77nLzVLA9I6azS70HtRDarrsUyxHIO7L2AnlMIBiP9U=; b=FncyTObRvPgdrCSI6L2rU6EcrtjoIh3Oy3GAeT1/XImUApPx7jctd7+4J0fWhVd5yt2vctnngVgATI2ZcH4DfxK55fb21ERbe5wYwteLPCTxLFExo2DJVdNeSwupp+3hqxZjYTHKVqEgOm2MCTPrqKq7HcupCHG/5I5yApbEj4931QlHA07Z7KH+DdtSphedg/AZMWrXobNQzqrC5Yg+F8RiB79uDLU+MglRfZ2GpFVt97zx2/crR0ue0U1Pu1Z7MMX+vL/J7ExTfJUeke7JR4vVltmlvxtmYJ+/XnT85T84okPHeCF8/zLe348sE/gV/WIbedJEXeZssqai/iB/Aw== 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=77nLzVLA9I6azS70HtRDarrsUyxHIO7L2AnlMIBiP9U=; b=hOZ53IHfEarTtclBOExSaivWb6YlwLCkr5rQjLatU5+MuxOveU9OuYPfApbc2lOBVR8jZL/WY2TQLrqbShaiGqQocLM6PsRMMWbOA6k/dWEPhSX50DS21e929olOpg2w92nuLx9ITDfOI3C10sRzJON4fEE4izdcPBpUpobQ9PM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS5PR04MB9754.eurprd04.prod.outlook.com (2603:10a6:20b:654::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.27; Tue, 27 Feb 2024 17:22:15 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 17:22:15 +0000 From: Frank Li Date: Tue, 27 Feb 2024 12:21:53 -0500 Subject: [PATCH 1/5] dmaengine: fsl-edma: remove 'slave_id' from fsl_edma_chan Message-Id: <20240227-8ulp_edma-v1-1-7fcfe1e265c2@nxp.com> References: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> In-Reply-To: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1709054529; l=2161; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=r+SX1BIbt/a8XXIeUpEhiy0sFQzztcqic+7HKpVi/bY=; b=cfGe/Z3C5UnFeJImNZ+LXU4oZem9gGgPsVBDA5wtpcW/s/FDzBRM9a1qPbyYHdTnFViuclkiX YamgA3epya5AntarmvHrkIA44CiEvkylBjbz+ghk0tMmNDcWXVpNdPo X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0059.namprd13.prod.outlook.com (2603:10b6:a03:2c2::34) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS5PR04MB9754:EE_ X-MS-Office365-Filtering-Correlation-Id: 4493227c-4ded-4eeb-569f-08dc37b8a42a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nB5yQdgBObp/kGZlX7IoRk6NszQtfwlJMqFXCjZhhIqy5uHX1JmzPvUX2Z6V3wKQx6BU5K/GurCWk7CI9FlgMKfMKG3NVjXxxPiK8kJuh6EyccbuG9e7tGYRO3qMgG/TtvBsUyLoMtdmdxaVR7zmx9TuXOrAQ08j83LcEOW7njVLmGmmRVMKN7qlkfgXW3B2ERsjySAPyonShcbEZ+OEZu8GmZfu2C7f7S+cHtylj/muEtSZ5M1zsib6EougKuqSFlf0HaOkjqHy+9J+hAeBBS4kZyfwtb1DhJBMAgoIkB5tOcPZqCeYufg8olWKuHOldOrWOuq5+Bax0+F7HkhLiYUxbFJczlp+kKTw6A/UUA2nxBuXpnOt1rKA6psMHbErzd5Qhm1gELQ3+NUpTMWbOKko1vGBgq9dEV9bb12Dov0QI5OoLIw+1+YiYwxUpglMtgXN54WAj+xSPKjOrP9K9NW8yo9s1toV1ihqop82E0QssNG2PpOrIn2lC7/eltapWwGSwQA8gDM5003kpqH7Q1TXAlqvP8q5kNN9Fj2L7VCI4Nrb0CdMLZ6UQCYzweY56UPFHtQwz8QFZ2uvcisU8iDoSlmp8dXt4kVX0SRjXYTS/a7yRbmrlxwzWSp6+eltgp7IJGY9U1OFDjH4GYurKw8eUW51nGisDOTghaKKxr0qZniXyJ1+0WrtNCqHuquZn+z2tMlbNL5rTmLzNGChsm9iwqXS5V2FPI+DgZU3BmU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?wIYMNd4pZaDQkiH9n3wPeSYMmzob?= =?utf-8?q?P/d5CsYffHalnF0KMiZF6MX0Zdz4cdteNiIotOxAOKe6q5mN4MmA8JS4Wf8q93R3G?= =?utf-8?q?zIS8IaH6sdPhUCIAYthJxvF3DQM8wnOD5dkICchcqcRA6pVgnV0w6rlgA7LnFZj3X?= =?utf-8?q?IHITGcSAZTAnXKbQSMj2Mg0Sghirtov5kMfnE8vZHXQTThIJjU/L2EnWyYXctnOoQ?= =?utf-8?q?OGGzq6YeayzPuuS1xjH6wevbDxryBZsbOJ8vEeW/JrXhztiVT8PvHGMDvOXzHMDja?= =?utf-8?q?03d7kISJei13lub7DfeU7RKlzXMjW5J7UkNZxEcty4S4/N2It4Ahe0DOi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utf-8?q?CHsTeKdA2h+9Kv9YkLSw8RzQlcvQHY0s8EdUdh6Cs82dl1a+F89BTjiS1aPcP0V0v?= =?utf-8?q?28Dg4PVOxsOZbM+bRg/LZRDqzkKMfGoiBzC0mhMgqXHNVBwgm9Xkye37aoGVSgmAy?= =?utf-8?q?m6vYp4TUDpwNkpjOgG0apkQ8KQ7Kr1EabavIShyH+MJ3jx4a+t8kDlS7Grvonj7UF?= =?utf-8?q?5l6KsIgF9tSnW9317NNKnh7AgtakVSDlZs8GURflB0nz10X7bQu7hHN6JiSZ7kVr4?= =?utf-8?q?1VOT5xekoJgDujOnAchFukr1EZY3MhLSx+UQju8ADemMe/zM/Iljdn8Q=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4493227c-4ded-4eeb-569f-08dc37b8a42a X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 17:22:14.8440 (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: PdjXTUgGbVcb9qOL8xGCo15KngQV2ZqVIQQbJqqlkQYQB3Lbzg1gbJ8J15539chboxGbz4FBvN/N4sbJlbKcFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS5PR04MB9754 The 'slave_id' field is redundant as it duplicates the functionality of 'srcid'. Remove 'slave_id' from fsl_edma_chan to eliminate redundancy. Signed-off-by: Frank Li --- drivers/dma/fsl-edma-common.h | 1 - drivers/dma/fsl-edma-main.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index 7bf0aba471a8c..4cf1de9f0e512 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -151,7 +151,6 @@ struct fsl_edma_chan { enum dma_status status; enum fsl_edma_pm_state pm_state; bool idle; - u32 slave_id; struct fsl_edma_engine *edma; struct fsl_edma_desc *edesc; struct dma_slave_config cfg; diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 402f0058a180c..0a6e0c4040274 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -114,8 +114,8 @@ static struct dma_chan *fsl_edma_xlate(struct of_phandle_args *dma_spec, if (chan) { chan->device->privatecnt++; fsl_chan = to_fsl_edma_chan(chan); - fsl_chan->slave_id = dma_spec->args[1]; - fsl_edma_chan_mux(fsl_chan, fsl_chan->slave_id, + fsl_chan->srcid = dma_spec->args[1]; + fsl_edma_chan_mux(fsl_chan, fsl_chan->srcid, true); mutex_unlock(&fsl_edma->fsl_edma_mutex); return chan; @@ -540,7 +540,7 @@ static int fsl_edma_probe(struct platform_device *pdev) fsl_chan->edma = fsl_edma; fsl_chan->pm_state = RUNNING; - fsl_chan->slave_id = 0; + fsl_chan->srcid = 0; fsl_chan->idle = true; fsl_chan->dma_dir = DMA_NONE; fsl_chan->vchan.desc_free = fsl_edma_free_desc; @@ -682,8 +682,8 @@ static int fsl_edma_resume_early(struct device *dev) continue; fsl_chan->pm_state = RUNNING; edma_write_tcdreg(fsl_chan, 0, csr); - if (fsl_chan->slave_id != 0) - fsl_edma_chan_mux(fsl_chan, fsl_chan->slave_id, true); + if (fsl_chan->srcid != 0) + fsl_edma_chan_mux(fsl_chan, fsl_chan->srcid, true); } if (!(fsl_edma->drvdata->flags & FSL_EDMA_DRV_SPLIT_REG)) From patchwork Tue Feb 27 17:21:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13574159 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2055.outbound.protection.outlook.com [40.107.6.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0768614EFF3; Tue, 27 Feb 2024 17:22:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054544; cv=fail; b=X1CR/gIFPeg6uSpib/p9P+bHJ0ZrndI9FPRmGH8p8UT9n2jDX7wpigO0vSbNW+OVcji2ldOShNIGdB6oR9fgEWcaJD8HPlJdWyryPIYDdBKPaEVN7dq/uqNkC6VAnKUt92X7OE2iYwc7lhZAIr9QIbHiEh5Z4nBb7S6xvFuyTqo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054544; c=relaxed/simple; bh=Cba1I8lPfT7XGGJBLhHLImkgVygTholVVk8WsvGvZuQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=H25vVGD+Od9kZWAysdo7uZ3xbCvpdD9i2Mqu9iiyVL3x8Guonr1w5z9ZS9UjAxhjW699VS6MIUaxqtWwB3puzC3JzKFjfJpZk25e5bGNLAIp2GbWa8VUYm1oOZZqqyChWit6e459kvv1Ln9kXH16DaKea7pe2h5Pg5m7kjSxVB4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=Dbu9JDr8; arc=fail smtp.client-ip=40.107.6.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Dbu9JDr8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iJaa8YzY0yU/dLMtoM5SU6YrO8j0TqJQNjuxv3ZzcCXLzymnXtXWLz3feHoJOwHVjwW4uXQx+T7zBTGpb1qev4vSB0nxMkShDph6yYJWl8QGrN6jX+m+vXiSW9rGI6Jzks+eGUbEG3a0FWrZ8zRzW12n/YsfS6hoVvk4vA+QyNPTyebaObUjry+ChaYu/qT6+8dvVe/FpBk537alq8n4NgyLUK6WxdyOL56D/tv17flFt0BJ5YXNZlE1RqH9XCiV7Gx0fu9C8x9wIeXJK+wUG7fRW62oO/cXTTbTZE++urXX0dfvltWiBKAbP6R85qiVcLE4Myf33f2hIy6iu/5p7g== 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=OLs/58IIUeveyfmtV9PhDz6tUG0OWzPy+/o3nZ1cyIY=; b=Ba3nrCNQTUMpCdcF5RETFLCRC2l8XsApsgf28lA0jf8fVEB+o2KKPZolAaWHOwi6dy3ewj5EctFh6aQwAcmRNvL1htj5Gse82nMqShBvylwko+t1jZXuSt0BzQTFPFFSw8cn0fPGXvM+k0oNTh7rLrvIJGjgKEKnQxzF/XoQZPw0FGABPMcHQr0LEi+gz2OY47dSk1QKHGgw3mgmqm+VpKOcrfkymvPUcMwV2xGb8LumPwdtyVJjfK+xMjnFITmA27ZjK1Woo5MsCFMkLaFlEytFN2uQ1SAmGpu2X/OfTIwlWrX7i394TcjR5L345iKUO3bxTSTuTKJYzn6El3yeaQ== 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=OLs/58IIUeveyfmtV9PhDz6tUG0OWzPy+/o3nZ1cyIY=; b=Dbu9JDr8Hq28cT4y2zahOCHQ+K1ISKnbe6WgvqRnT7SMdRASbjbrCA9KS0mGKriBHzzhO++NrBSoylo/4vQtNv4LO2W3z/LIrJd6w+qWVrVptVBPQeODFrbNWIAVrTS9peXzG1eVVueQsqC7uf9p/8KGP16hYJUMkoIcDy3kawU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS1PR04MB9408.eurprd04.prod.outlook.com (2603:10a6:20b:4d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Tue, 27 Feb 2024 17:22:18 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 17:22:17 +0000 From: Frank Li Date: Tue, 27 Feb 2024 12:21:54 -0500 Subject: [PATCH 2/5] dmaengine: fsl-edma: add safety check for 'srcid' Message-Id: <20240227-8ulp_edma-v1-2-7fcfe1e265c2@nxp.com> References: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> In-Reply-To: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1709054529; l=901; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Cba1I8lPfT7XGGJBLhHLImkgVygTholVVk8WsvGvZuQ=; b=BmFxSUdl/KUEZPYVMBtSkXMGE4o+yIg7DElAlG9Dvn9iZqgL3PJGsxSGm261NMigMG0Okfx+G QlPjEYBJy9VCZEOZCSLJNjSt/ReeFaw+ZHaJrFeGRE+VHkbLa1A1x02 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0059.namprd13.prod.outlook.com (2603:10b6:a03:2c2::34) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS1PR04MB9408:EE_ X-MS-Office365-Filtering-Correlation-Id: 18ecc72e-7ce6-428a-7423-08dc37b8a5d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XarjfkF6ztdFwprXzf4yUFLF7cPwZeBSVLCX3XnhCcFcG/9DaoZqVoSBbL7Cjs6+s6jaAQnvqDXNoVO07gLMRKgZNrB+PlZuRC/IJoUzg4I7x23JYcdQmO3OScD0r7RkjKWqso2wgJq0aWH8/ZtBVIHybH9bDD2pok+ET9y/IASJAiG9Hs2qc+h1xg6NR6x3jxTa6/AH3QzIIKC/R8paQ3AmwLbTUftNWQQABsylv78pKPo3AmU4WlVZykDvcDKx82J1obHW9gUxbBKJdpbeMaGA9PGYRF3SWeBc0iQDUDMnMi1qbL/67qQJKSmMVTZVLUehj1gHr66l/Vi0OTE2EG/C2D5A3RBhYQwTyrTgzJs/lJGkG95uTj443/dSb5wVIPfjqUr9vxAYJlCq1zy9qq989AfH8uhMfd7tYsKqqT20N39xffCrUXVs3uCvhyT7KSPK/SsR00qtNYvCPMMDdMZEVrq7tCv6ngeaM1zd86Fu1JmdbjkPcYIbNu/9Y51XGcd0Gga2V/G2kZD1MbIb67TuyqDpjr+8rhc+UD124s6O0ohPbeiFm9beNlxjx8hci3HQMMGTLFMRrvhDa71nBqk7P8pmrz4AQ8IL5EAdAnJSO0NDtG+mB452CruFQ0UB96GXcItIyHPE5K0V33sKYComAUR0KRniRP0C+pXvA8aEHV8CBFgvzxE3qqhlJfYA82IrVthJRAyIC9jt9V2bMPiyRM1+ria2FMmD9DnNaIo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?alj/XzTynL2gto96CY8q7hmlvd5g?= =?utf-8?q?BGSJnDf3Tyc3FVvVSOslV7HHc60Q9//q47J2EEuGVu0FbbtF0kdlRcBJ8DhCMS2JF?= =?utf-8?q?Y1RJzVv8Y0X/D3Km05WEC2/ziBm+2e80gpCwOxSWdEt1G8ngOrNpqokPdt6HhW6AN?= =?utf-8?q?pKDgahc8jSyJMWhW0VmRfE6OsoEw88LuLBRi49KtTZTWbOdxonTmxBERw7zf5OXxp?= =?utf-8?q?Xw/j2J7w73EVK+9zvodze7b50xWvwS8oXjWaOI5srcbpCRdONvFOscz9+G9q6Op7l?= =?utf-8?q?ErgDUqe2yhArRLHzaf8/KhSG6qTOkLVypQGgctQSVDMtNv3hz3U9GlYRyxsgNEL+D?= =?utf-8?q?wRT1ZVgrLRCbkkCC3OVI6PEsj5dnKKPlRX8r21rASO4RzI01YhOSa6Yx0jmqzggUB?= =?utf-8?q?zOV+gKURM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cMZ6D0JEDA+jUxlRoiVzAWt0SFCfnGp1M4mpD5X/mnlt?= =?utf-8?q?YCJ38rnhM6RBB/aeFE8NS0CIVftEhmDtIt8xw+TbtWaB+3hGhh9LbqvJGUhQImhYT?= =?utf-8?q?gCiuZjKQNG1INTKOLSi785OegwKf1dZh5lPBZRZ7f0mst6r8fJqJhXmSpBYxq9Qu6?= =?utf-8?q?CBCCwHWQrty8pjJYnM5UmOf4NuuHsQxeii8YiHhMFXkuCiizCMRTWhNImIni60WS7?= =?utf-8?q?3eWlyIlrd4gM?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18ecc72e-7ce6-428a-7423-08dc37b8a5d0 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 17:22:17.6074 (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: 6w1LFTRIkZ+ZXYp58HsAkcKsVTraj6Z2nS7WKim559ZQ0SeOMfRYdtqXq9wlzKmzIZ64giZy0yiYwra3gux2lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9408 Ensure that 'srcid' is a non-zero value to avoid dtb passing invalid 'srcid' to the driver. Signed-off-by: Frank Li --- drivers/dma/fsl-edma-main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 0a6e0c4040274..2148a7f1ae843 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -115,6 +115,13 @@ static struct dma_chan *fsl_edma_xlate(struct of_phandle_args *dma_spec, chan->device->privatecnt++; fsl_chan = to_fsl_edma_chan(chan); fsl_chan->srcid = dma_spec->args[1]; + + if (!fsl_chan->srcid) { + dev_err(&fsl_chan->pdev->dev, "Invalidate srcid %d\n", + fsl_chan->srcid); + return NULL; + } + fsl_edma_chan_mux(fsl_chan, fsl_chan->srcid, true); mutex_unlock(&fsl_edma->fsl_edma_mutex); From patchwork Tue Feb 27 17:21:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13574160 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2055.outbound.protection.outlook.com [40.107.6.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E07814EFEC; Tue, 27 Feb 2024 17:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054546; cv=fail; b=Y+an3t0P1SdbouRtX5b72DoZ+6UW5KCmjcx6+m7XAtnkan4BBFxnp8R6x8ZCqTqlAFOe37QtY7kasdbkYz5NYou3zA2gWJiJim5dXOFmGgLHq7BxEG7HOspzb3hTsBc924FH11jJCvSQrenZ/zdUTJxF5OI/wooCF8DKUr32g6E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054546; c=relaxed/simple; bh=1SY1nKChJ4s31bmrpysVWazodvllDv9ahLCc/bCrYcQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=mn8mmxIrXeBoM6zb8d5b+VO2F/3AdBbQ4UfV7yCsB9fIe1KkwTZcg6azFOr/e+Dk+t1/kKSI3JgzYVe7RBe4btgX2fbUxCShK9DxyURkxL4ULrNYlDWTbnWJPwQMwFtCrIszKlEeZzODR3IYXAU0lzkPsh6Q2CqvdZBp2mCNxro= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=a6mjFSxp; arc=fail smtp.client-ip=40.107.6.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="a6mjFSxp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XoLSCS9K9KZO/Nh3FfGUibTfKLXAvOjfZyePh/dQwpS9dvhJhLhNNV+GghZU1vQ9CHmaF268kQKTv7arPRm4pz26qAKVmI/Yu2f/wy4VkqiPbGJ8H4V6g25un1oUNyl3p7FP9FA47QmLu6TrDXm4ATODU50OxmKOS9POGpCNIfnuyd4bBzsPPUEFhlObSv9xqsEbp9AdE2hOkxXukxJTuPJazAxjcvalPeb0ayvLvGkYEG2B7xj2L2fHVYUplcIT6KuYRg49nUsmM2vFvSlyurAIlKj3eneF03pJ9ZlnlhSoc6qqXIqjm5YAfbTtU8VIuO+ulaRNNuXefRs90xbTcg== 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=O3UHH8qhH5HTx8E0tLZorZnJnKCrjOdx/qvKkcds5Vg=; b=f9/a7ZG2PXSfw9gsM2d3YXm8GuhB3fRyrXpITKNfu6Rye1t3WoU8N7UzT/FksWwFVygs1wrKE6TTkJBvtlcfo/XnyxkU60wiXuTJrLELffvg0lVzSCtZqQSC+Bgq4VUQel8efTaS16j5gRwNqxw6OfL1cfWsH458RxEIRd3MNWK5gxePDdusXfqHKVvsgQYfQ3FMeXqRjn74SUxK+ZjUc2Yl56sQ51V2hXl6eJwNSwgLxPZBBsyxjyS/cZiarHFiwCJyc0ZlMH6CvbqgWpgXVZH8FFXSb56490ID7hjbiD7u/VjhkZs0Q+Fc774JFTO1L5BjClLPxNSRq8d0XvNzFA== 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=O3UHH8qhH5HTx8E0tLZorZnJnKCrjOdx/qvKkcds5Vg=; b=a6mjFSxpn/kNrTXIwvhzuKp0tMreeOxL6ZHLpdJfymLcQCFqq9Skom6hNde2jw5JKYvJ7EKlxDKEJrSyFnbZdIB31dwYMiYECEl93Ngp0DDnZo4rVq5q5G8MRlb4u/Zg7ctNEShWXTn81KPL80tsZ9LIoszJytdRCztUykKUGYE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS1PR04MB9408.eurprd04.prod.outlook.com (2603:10a6:20b:4d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Tue, 27 Feb 2024 17:22:20 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 17:22:20 +0000 From: Frank Li Date: Tue, 27 Feb 2024 12:21:55 -0500 Subject: [PATCH 3/5] dmaengine: fsl-edma: clean up chclk and FSL_EDMA_DRV_HAS_CHCLK Message-Id: <20240227-8ulp_edma-v1-3-7fcfe1e265c2@nxp.com> References: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> In-Reply-To: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1709054529; l=1717; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=1SY1nKChJ4s31bmrpysVWazodvllDv9ahLCc/bCrYcQ=; b=SUHRhItUXSezjubWHAqVf5qJ/rX0X9GklyZ6dfXPFRI2EpL9uu/bCUzk8zGIHM+CqbjaL0+NO WQwPdHi16j9DW4K+Fmcv35VW4exNZ8FF0g/18SvmWA/tk2GgvAuBBXO X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0059.namprd13.prod.outlook.com (2603:10b6:a03:2c2::34) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS1PR04MB9408:EE_ X-MS-Office365-Filtering-Correlation-Id: deaba51c-722e-4109-19de-08dc37b8a774 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VeBPVa2j9ithHeMPnCgKcEMO7HeItGwsuj4ywfcK+ZeNVcwGD+ONMqxXv1KvwYTgBOKAunJhnWm8ARGTDkKY/nFi0QMekM1AOedDLfeb5Pn2/Xcz/cqxhEZ20Wrb/D8VC8/5sV3L1bR5S6XR5XbUCCG+Ar2z1s3ylc61wC5E6JO3GsxgjVyDNbO6JShEGijpSLWVx5XZahyHWIkhrFjSRHpN7U0SRmY5QvO8wyrViPCfq/cnwg9CT3D2TP1kDM/2nYfJV9VHfAyNm13fHuqaZMibMip1jK5h3W4adK8toeIczYv3pCGxZQVunsI+LGT9TEaTi5yMGhkIq5Qc31IcX4VOz3LBTqqTQv7ccDhn/df7zVXa8g8D61IIAJE9KKfjxhK7HxsoUSxgjk32G86aovyov0eT2hZPQPbMUtiGeoLI0x6gCOzSG1jYen847EmuXHZOkzG8YILel1sYgydMnzU1OU6kla4kGRY9xQ+Q1b+H2Pp4iZwyoExmz8ua+4mroOSodCALeagqVesvtjzf64nkURszSaG5WNsiwsxzsP0uD9+Zp3qmetc61uKb+t0KPx5CJedlp6TT+5LA0TSgZHyTGIUYbQdY7mnHiMoMFlV5UDuTWJFhMiDzcHxCh3nmOi5F604C8m61vRd0UnYSoDXTR5plMeOfHhaGFbxfETscYpxWDOriU505LVaVOkZ2aNJM4lyPfX01G0fnoPDrB2L57t8yuAKhKgGO/6zo53Y= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ujR0LIRJU2qGqFoi4sp2drTk9pbV?= =?utf-8?q?PEdkuQiFt4LguQlq/ie+0fjtXmn+RdKBy96qHLIkzxmyWMMhwNbFsNuLThSZoN00z?= =?utf-8?q?bSkKPsJxEx4GhaYT8II1wyXxWUfYXt7i2B6LNqvgKQcWvndhj1D9SB2UmpNOW9e0H?= =?utf-8?q?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KXyK3IvISNc/Aq7zTjKDRvWgpkwhyuRghfbObYXhkIQpxPpiny?= =?utf-8?q?0u37Z809v06gRD3Pjag7EsWupYRplm1PUPsa8TXMk8xrXznU5G7D3E0jko2zOfaPj?= =?utf-8?q?pNQoZKOHNTck54hJ6UgGS9KIw+xop/m0CDgYnTYvQh43QEL4jnzov/NJL4qwK7m6I?= =?utf-8?q?SFxq3OfJBASBWhmI0zb2hR/KulKlAR/CGyGkGq1D+fTpQ9+Qu6SG/7xw6DeXbPSRV?= =?utf-8?q?yLXNg26W12oolh2shOpizjQ3FS6ho48Lg4SWtf2batxCU17XTPFOvvn1Jiaeoc6+e?= =?utf-8?q?CMK5BdU1ugC0mmiNVAXzKy0uTkwYVK3W3ad7Uhdaow5rxxZc25lXpOcSME9v2sLO9?= =?utf-8?q?W/SHy3mfx/bTDH1zJmcV3SdR+YMD5ZPRNjCArDf7nfxKQnfwOhyrd07SsmeeUXL+N?= =?utf-8?q?vCLQ+T6Ph07n1Sbq/nR2x/5pNuw7luzKWDy8uoAYUSFfctRhPpfr/jRU1nCVC8k6/?= =?utf-8?q?Ebuu10kHvxgQ?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: deaba51c-722e-4109-19de-08dc37b8a774 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 17:22:20.4362 (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: JmdGKF/ojjGK5bDJJTKt/A1Fu59HuEXqadQmflGBS8TaB0t7WFTZCP2W/mO8b8DGRK+n58I/ihtEuyta6VbVAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9408 No device currently utilizes chclk and FSL_EDMA_DRV_HAS_CHCLK features. Removes these unused features. Signed-off-by: Frank Li --- drivers/dma/fsl-edma-common.h | 2 -- drivers/dma/fsl-edma-main.c | 8 -------- 2 files changed, 10 deletions(-) diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index 4cf1de9f0e512..532f647e540e7 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -192,7 +192,6 @@ struct fsl_edma_desc { #define FSL_EDMA_DRV_WRAP_IO BIT(3) #define FSL_EDMA_DRV_EDMA64 BIT(4) #define FSL_EDMA_DRV_HAS_PD BIT(5) -#define FSL_EDMA_DRV_HAS_CHCLK BIT(6) #define FSL_EDMA_DRV_HAS_CHMUX BIT(7) /* imx8 QM audio edma remote local swapped */ #define FSL_EDMA_DRV_QUIRK_SWAPPED BIT(8) @@ -237,7 +236,6 @@ struct fsl_edma_engine { void __iomem *muxbase[DMAMUX_NR]; struct clk *muxclk[DMAMUX_NR]; struct clk *dmaclk; - struct clk *chclk; struct mutex fsl_edma_mutex; const struct fsl_edma_drvdata *drvdata; u32 n_chans; diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 2148a7f1ae843..41c71c360ff1f 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -483,14 +483,6 @@ static int fsl_edma_probe(struct platform_device *pdev) } } - if (drvdata->flags & FSL_EDMA_DRV_HAS_CHCLK) { - fsl_edma->chclk = devm_clk_get_enabled(&pdev->dev, "mp"); - if (IS_ERR(fsl_edma->chclk)) { - dev_err(&pdev->dev, "Missing MP block clock.\n"); - return PTR_ERR(fsl_edma->chclk); - } - } - ret = of_property_read_variable_u32_array(np, "dma-channel-mask", chan_mask, 1, 2); if (ret > 0) { From patchwork Tue Feb 27 17:21:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13574161 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2055.outbound.protection.outlook.com [40.107.6.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28E1314F96B; Tue, 27 Feb 2024 17:22:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054548; cv=fail; b=uurc8rd11ln+nVkpq7soOOnwdvoI+0MTXnmxJ/KDZa9p1ST6jPPqyZfIzfqsyObIaVZ95TTbXgCpGhoPCvhnVKwbx/1iuS6Y3NlUmoM1sB4aoloup7eTFoQKjN/Lt7d83MUFNTqBDQ/+tFidNavZTM3b2QlQcZqsbW/Fhwfc1ao= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054548; c=relaxed/simple; bh=zLHJgKGxu9Dd0LQIch4VyD83KuBDmBwhI/g6Gh9w5ZY=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=JupcE+WQLGyQAH0QcM32ZG2R6saGWC5s8Oi0FkmAP7UVIzFOq1FTbV4yhrVCbM/fn8EP52tiscdiBwWdYUh/JmPAbweZ8A0ynAeAzRReGJ3fImicFTiO+iCn5ePxJRLU9/6rFlZ2Iju8CiJD1GEUiuIydxgqtOStdC9XQK5Gx5w= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=B7RgPyPB; arc=fail smtp.client-ip=40.107.6.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="B7RgPyPB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QelHv5rBPil1bvz+7TL9gGr9XoDVbz/94Z+qrXTFIeAiFCpQgLCdCzekcUVt90h+gtqqVPCMZ+o5mIOTdqPIcD5Hwwc1w40l30NMmq9sM68FY5lDXuYMp2WN1iux70V4ALazXKe3DHk6eO4h15ceajvcHrZun+25VUFGw08IfAttZe8o1U1MK4zyL9CLxAph1p5jDAoFhQwwE052pse+yhbcuDqVrYLu2aR0M/5HVJbXte1DKKtDtWEMOu0dNu/WiF0kh64KnbmndiRs0G0E2kBD6D2Ru9i0Xgcm7jOc2kddbhZv4NhAei29ky8cSb5HJbjAEv7rvzpLuDJXhZP+AQ== 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=0Oienn+MSbSrCphiXgPWUGnaou44oVPo8joKzJ6z/6s=; b=Oy1YeEZuIupQRJSVQ9e4aNJMqJzwaLDqVcTi+doBzAxEl5RQQCtOPj621qNfmvV+XDaB5WR9JAjLY84IRaMobwTSQSGU8IKGEGzsuWkeJ+cCiVEO5ejXLxaJohg3wMJWMxfiEX77BQL+e9RFTGLCVtXJ3Ge+IbuUc+U0vXXvgDEMjBTK/lHFRUr0z8kYngZX83E0j0zhqMhY+v/T5QATehwmxC70hP5a1QDtaUjHkYl7hRvbsU91vnX51wld1LfALvNx7yea6111+CIsTWujSnve+l6k6tbZsWQTJ9TXVnYIcQwTjIAD9IzWRx1+QA5e/Db1Xsx5sLc8qGdcfMpBTQ== 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=0Oienn+MSbSrCphiXgPWUGnaou44oVPo8joKzJ6z/6s=; b=B7RgPyPBVuplSbvRtP/Dx26M1wD/Wz/TAu9BRTLL/xERZ68bC1v3UsPU+1uAPQeqLFgX3L/7vPqoLH9Es9aMv5RdKv5PqSkXii7xQQBPXhovfE3eNIIfuepZ7+asQfnWcaRqE/w+xSIr6A2yDHEGfMzPhLT9n409mTaJ/AwfUV0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS1PR04MB9408.eurprd04.prod.outlook.com (2603:10a6:20b:4d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Tue, 27 Feb 2024 17:22:23 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 17:22:23 +0000 From: Frank Li Date: Tue, 27 Feb 2024 12:21:56 -0500 Subject: [PATCH 4/5] dt-bindings: fsl-dma: fsl-edma: add fsl,imx8ulp-edma compatible string Message-Id: <20240227-8ulp_edma-v1-4-7fcfe1e265c2@nxp.com> References: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> In-Reply-To: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Li , Joy Zou X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1709054529; l=1639; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=/ayZNWifeByzbocFCHfeq4diylFnWb7v4U7hUf6Aoow=; b=BeBV2TBdB/ZN36u9SjL4QlUf3wgv1+9fwfA4+f2hbGk9Xly2LOj6pcKIus5oB+mr6C/TMdJ3n SUsy3I/RpASDaKDXnoBLfToJA+r4u7yECksv4xgkfqhfEnnevyL+FiZ X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0059.namprd13.prod.outlook.com (2603:10b6:a03:2c2::34) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS1PR04MB9408:EE_ X-MS-Office365-Filtering-Correlation-Id: c8a46e96-0c99-401e-df5c-08dc37b8a942 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LltPaoaGE8mSb7usfLc2SdR8ynul/a7yH+zaNk9+fAC845NXUPOUkGogr92qn9BONK9Kvp1ZTXPQe6TCkiyDDlK0PHIFEBTrqSsMq8/csnMogp3gGlDMNRsjE78RgLvDXvEoTGBabwWJBpDBjO+m1VgumkYVrh3pL/V55ZFiZRW/EPkPDSn8tSnPO7UOfsu7uUpVX3XImuJ0mUKKTEAgI6I3T/PpdQtikjgDgndRhC+Yr9gTTMv0RpQ66jCzT8Q+ix5oKwTFO/3tVJzdqewUeJa3hQMmNeYsCOxbEGg6dthFEeHnmPIRL7oTrqd9wmZEcfdSKGecmNgcEYq+0cdMbLN49Ytzzvi2pwaAc4xfVjCvn+qm9VyA5pzfr2ZnpmF2xp2e2+/H0pYPqYKtb542As/14c5MfbbZtsFhH5IvhB2aqJNAnau8TSGMtlfyS+oCED1Keqr0++VwQ63sR90f8l8QaN9c5spTG4nakObGsPX8rsQih/Mbiiv9KCehbhUpphYYZafIpjUPPOtXqE9eKVycNeTNFerU8Ya9+CAVIvQLl0MWNicqEl7F2kai3B9npF+97ylQI4NVwqH95I6SE7JlPhs6i4jCSz1R08ZNAgviMjWLIzQF2BQ07t1dVMHTf1N+/GK6/9xtMjeMnltoQ+LZl26mHIxMxjeKby+IF+Rsis6JCqkyKpA+o11OihZwBcZPg3C9BIczgqbKHAeHyA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8jIc1QBw9jWkZiABei9OCg33WZcS?= =?utf-8?q?pCbAYECJLkVKvaWfWHa8jpqG7tP0SHvyaPQMVoVHZ4ziGt0Fb76DORF4AE0I9pqY5?= =?utf-8?q?hGOWvEvuCF5CzywFyfMlD+eDNGEARxba1+knYvbCFvYFf286OFCWIVlgt6koI0An/?= =?utf-8?q?WcwhhB5Xb+F6qxHe+VAdms1liqZeG+PjtxmPfmbYrFI8AYqb4CdSGKJVxVoRFrr8d?= =?utf-8?q?XIX84FDQffWfP72nsCa/xLht6zEcSUDiDv9qKZNoPWVBZ5eZfqSJa31adnEQSuU+s?= =?utf-8?q?R5Kq91WsWYAWNqwGEHwdTC2LpRC3ytv4xIcNClCyKsCNAKtTVdP76MALcp8Rju9h/?= =?utf-8?q?My2v5ppo+59TETSsHt1l3FPruOgHdE+xe2MBZf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qtIoyIPKagxzsNNEx02?= =?utf-8?q?0uvckR5PCYUa7mw2+pjllr5IuS5ZExzdlIgwFzWsUWy5MVWVBcH2LTsjQznod5mKJ?= =?utf-8?q?+yrZQbA4rSSTkoHiOjPrs8gs+el4IqQRiLn81PA9ebmNrOZe7EmhNnSOoG8V5h5IX?= =?utf-8?q?72MPVLvEsYAKeIqwTBs2Ln2IK/hGZ9Y2N8uu1g8rsDKjYMBlrUVNYysjB7slCOTSP?= =?utf-8?q?3BzEJNqYSewAfECYijRYDRYNxVZY4+fBtHG0iiJPuZ3XeAVl0oU3zH/w5MmU5hpAd?= =?utf-8?q?7ao8PB8MHLfp?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8a46e96-0c99-401e-df5c-08dc37b8a942 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 17:22:23.4154 (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: lXlhquGBXFDyL4tQYr/93xst6EkVgfFgBRFuVgqMY9gkLvPI7ecuSo2sUaxklaWARbnXCPzgxTRgQ4AWy5TGEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9408 From: Joy Zou Add the compatible string 'fsl,imx8ulp-edma' to support the i.MX8ulp's eDMA, and modify the clock number. Signed-off-by: Joy Zou Reviewed-by: Frank Li --- .../devicetree/bindings/dma/fsl,edma.yaml | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml index aa51d278cb67b..6c04303dbe453 100644 --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml @@ -23,6 +23,7 @@ properties: - fsl,imx7ulp-edma - fsl,imx8qm-adma - fsl,imx8qm-edma + - fsl,imx8ulp-edma - fsl,imx93-edma3 - fsl,imx93-edma4 - fsl,imx95-edma5 @@ -53,11 +54,11 @@ properties: clocks: minItems: 1 - maxItems: 2 + maxItems: 33 clock-names: minItems: 1 - maxItems: 2 + maxItems: 33 big-endian: description: | @@ -151,6 +152,25 @@ allOf: dma-channels: const: 32 + - if: + properties: + compatible: + contains: + const: fsl,imx8ulp-edma + then: + properties: + clock: + maxItems: 33 + clock-names: + items: + - const: dma + - pattern: "^CH[0-31]-clk$" + interrupt-names: false + interrupts: + maxItems: 32 + "#dma-cells": + const: 3 + unevaluatedProperties: false examples: From patchwork Tue Feb 27 17:21:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13574162 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2055.outbound.protection.outlook.com [40.107.6.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2097B14F996; Tue, 27 Feb 2024 17:22:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054551; cv=fail; b=CIbyQxN7nyxAOw3Hx3dFDqkblfeI7nooNunlY3MulSwuFLLCXow+wZPIaHPtVmZXnB/agTL4YSpr+vIEMD8UnCS9kkgsP6u/HYPubsGrJD2xwoJsCBDkMu5mCCutadV6CrHHYWlLXyhb0ntNN1y+mi9Tk/006E/u6x4PREImWyU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054551; c=relaxed/simple; bh=sVHqn6H+sRc+UeESOOt1xPOX/umNA7g2fhLtywnubOI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=YZKPv5DcONGgPBbxVCwkfrrWu5UgJmNWR2a3mCvqwhtfbTqcJY2Y5SQxh2bVyweZOW3BFiZw8a0yX3KiuFQDxKyDHdOlWgIQ7sfPdF+CoyrnIpw+kSHj5mbvbXVYAkbnJOywVP8eyelJZSjYaMCjnxst0wcM8zl1pnotbWt4MQM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=sjoFHTA9; arc=fail smtp.client-ip=40.107.6.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="sjoFHTA9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BPp6ZYQaU8aK5aRRMqb8zgMyeB3QAwQtCYd0RQupr3MmwiuOJeEcyPlzQjJYbiVrSwt10rH1wGdKAuHI7+I9ikoTg4rekRFpHqgtn2tm5eFyQa4OQhH6K6PQcaf4yAUGDAwsP2ckrNwN238LrM6LOzGEhfXCoBEU00vlgFfu29LdU27WItY8bvlbyWq/8CKkUIWdyhUJ5DmiYwZ4Wh0hvw4yf/Py/LI3FBPV6O+S74XboRDeHtCzycS3z0Qzy7XMgRPtPrAc0+WUlpbsY5M3XE3uQG6YuBAYgaE0R9etEqh51bWxqwYeDqk9rTXRMTkzWj6iebv9jMV6rHwAQE/gGQ== 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=Xiz0Rtwc5CT1HzkoGwV9jE8Y6y1f6whfBWTv6CN9GT8=; b=BrEZToLtSS5uQuV1QsOTTPqxAh5h5+z5OOTXWce+xjV8MRNW/urKSt3bi8b2LY+7Iy/z+c/ovOBEn7oc7GtV+3w7nH/Y4cG851D6lQPTA+XNiv6GGWdnuh5hmxpgHznkmppoPWwm4iIHhX14cyz89O/FZa5lAYfCLIDfxMRZs4YAajZgFu2cuFWhGQI3ff8LWy+ykvz+ff9yB3t/C2YYkFTKxeId0sPvg2jsCUQ/7aHNyzsCvNMe3wzHXzHGV3p6+qL9p4HnR0Tcyv8WbQBn9bABA9A1N1z1ed2+w5E3+6vDRAhRx+9ji6RiYDD+5bJPvTgOv8VfsNV31Tr6djTS3g== 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=Xiz0Rtwc5CT1HzkoGwV9jE8Y6y1f6whfBWTv6CN9GT8=; b=sjoFHTA9pEtmEZaHhTfblPXNgUYZlfNT3MSjV4YtLoB29o/coVkq6kpHabQe7yObJeF8xDMHjJeLPorOISRXtLdC3sei8wF1K3GGpeJ+ACPAK/C4cnWlaMn+qeKcuiskCp98UgqEaZMKm+IrNDKrNoSwg+unS4fGdvzy1Ov96jo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS1PR04MB9408.eurprd04.prod.outlook.com (2603:10a6:20b:4d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Tue, 27 Feb 2024 17:22:26 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 17:22:26 +0000 From: Frank Li Date: Tue, 27 Feb 2024 12:21:57 -0500 Subject: [PATCH 5/5] dmaengine: fsl-edma: add i.MX8ULP edma support Message-Id: <20240227-8ulp_edma-v1-5-7fcfe1e265c2@nxp.com> References: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> In-Reply-To: <20240227-8ulp_edma-v1-0-7fcfe1e265c2@nxp.com> To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Li , Joy Zou X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1709054529; l=4648; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=mZwQhUw7aTNjqUrbP8MTrIFtWNHaiIzM6PH4ott4At8=; b=32fZs/BoUq6FgwF3ehMYDXUqeS+dYDwR6nmJEohFku+B08QJtrLumrdeHlpC78Mwo6o8x6Hie 2578i5CqksrBcTZQd6XihtkMXzjzIdL8xfYQlLl4WebwSWltE1oWUhs X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0059.namprd13.prod.outlook.com (2603:10b6:a03:2c2::34) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS1PR04MB9408:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b578e85-6f1a-4ec6-165a-08dc37b8ab09 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aQTxf46dAKi/h46gt02ViiY3MZEuhCTzfp2/ohsIyIhuOY2YPg4TkzhITVH9XESCyuvKSbxnSPGEOu+opA9cIw8mxmuoYzlmCjapMuqRrfdj7UC7180y1nlvNMZMFbyXV5lk6zh3g6F21NyWIG12trKwiLXyAsHYMpxFVBJGrE73UmOZoEinkAtkWvOaDxWlGqKSqj/fuucYxGJznkijnYexextwF81H1GlD6yiEnoCLXggjI/jFLIJTpN3XFfW94IJ1rxdp45rKcCJFO8elT6Lm+nblTqTVzIZx9Pw1ag8GitLL+yfWsnUx4j8NHiTOubQARfhtyp4ZdH9e+fogj8r9netFF5B6NSJ+31oV43xEfD/bKQ30SCSuAwbLtLZ9eW5Adbp5vg1yBvbn+1rT9BTSS8Bv/8YEW1U/x4lS6ycCtpEtnC13DP3c8kVsAukMf2qYNdSWeyg49rAwGEkJlk5RheVm28fsup9AsItWaXeuw+ZnaOdqGm+bZVoIuu8gglmeKqYsDMEGU5TJVyoNxxvXUWEkT9iOZpxVDlevGPTUKsKmu5lts1FPbGaIOPViMercSIzMHpBR6pOZoXXEpPARA3vbTe8EExeU0yCSCVcJxqKq0bnBPyI4fpldxQVZbCwGgpx6qJKKYXiKhS8X5dLTOErrCT/4W31hsNoebN7kEWwmzf3futnDAziMIlLMtipphsDEmjLRTp2qkEf1gzRY37BeOIE+ac9q2pa0uzo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)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i5LjalBMryVwyE9YhIGxtXsohLWSlidf1uggh8eWRlfFC1YB0WI?= =?utf-8?q?1QRqLhbE0oYttumxU2Huu/b0qU+Jxe61s3GqCWn+obJX095z2YsL/Sp1BOB6fRFgK?= =?utf-8?q?oWleLcH9zS5Ob2N0X/WCStXPEGmvERXfgXYrUbGVIRLkmUWEWqTitKzYD7g6Ko73g?= =?utf-8?q?GmAaZ24AYtC6+5jzq/JjADL1TBwFBTtppo6oIvliHa8wmfY0ItyDbtdMbBOxDFMQF?= =?utf-8?q?GW+PUUuOq8E1wVHHUe8m6Y0PcfOKrH2H0bTX7VlTezbiEu8x+bopvSVmgdvnxRMkn?= =?utf-8?q?gmiIz/dFLKWikIkqlvNjv0h61fknM1Voa4Fyo9JXPby+thAf0+WOX6+x+pyQfLaKq?= =?utf-8?q?dDOmKf2TYTxJDvsuA4ZGjHxtLy/MCZH7udY2dpqwq4xVa2CeKM3S4fwY4LZFEckOB?= =?utf-8?q?z5GLS8yCaZqVfMvwVVZlvaP/5EknqKl33UbfNKPCxLPY/oUYFSnth2vxNavIhPVsM?= =?utf-8?q?th7ZRD6D+EA+cwAtgpAw813Syk5VzkAeyvtqH1iT8KrhkeK2yKU6lbdNM9+h0nOkK?= =?utf-8?q?ZzlF9UL2ADUqd30ViXKP0dY1O2XZ47SEYYNbb8TdKfGUZMNVOOozzLyLusImFdgbO?= =?utf-8?q?RfmEyBnOfx1XGIa5DMcIJcgV8j+fgMo+MmNmDxJjEw4fgL/2SFm1Yp24i6W3eTb+6?= =?utf-8?q?7VTOgoV7plT6Vo8yRIMrUw1L3GHN81zT0AOvyvMhqtTyWHKPynGa0h88dwATJWEfx?= =?utf-8?q?SX1yPcKtmKDe?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b578e85-6f1a-4ec6-165a-08dc37b8ab09 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 17:22:26.3660 (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: YXcdlwG3XPSzEWoatWTfzn02cB4fUfQALFLkDFdD93zyJ2m2Y4kD/Ix15CdgRUd4kH/eiV/EAvJpAfebXuFOeg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9408 From: Joy Zou Add support for the i.MX8ULP platform to the eDMA driver. Introduce the use of the correct FSL_EDMA_DRV_HAS_CHCLK flag to handle per-channel clock configurations. Signed-off-by: Joy Zou Reviewed-by: Frank Li --- drivers/dma/fsl-edma-common.c | 6 ++++++ drivers/dma/fsl-edma-common.h | 1 + drivers/dma/fsl-edma-main.c | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index b18faa7cfedb9..f9144b0154396 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -3,6 +3,7 @@ // Copyright (c) 2013-2014 Freescale Semiconductor, Inc // Copyright (c) 2017 Sysam, Angelo Dureghello +#include #include #include #include @@ -810,6 +811,9 @@ int fsl_edma_alloc_chan_resources(struct dma_chan *chan) { struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan); + if (fsl_edma_drvflags(fsl_chan) & FSL_EDMA_DRV_HAS_CHCLK) + clk_prepare_enable(fsl_chan->clk); + fsl_chan->tcd_pool = dma_pool_create("tcd_pool", chan->device->dev, fsl_edma_drvflags(fsl_chan) & FSL_EDMA_DRV_TCD64 ? sizeof(struct fsl_edma_hw_tcd64) : sizeof(struct fsl_edma_hw_tcd), @@ -838,6 +842,8 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan) fsl_chan->tcd_pool = NULL; fsl_chan->is_sw = false; fsl_chan->srcid = 0; + if (fsl_edma_drvflags(fsl_chan) & FSL_EDMA_DRV_HAS_CHCLK) + clk_disable_unprepare(fsl_chan->clk); } void fsl_edma_cleanup_vchan(struct dma_device *dmadev) diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index 532f647e540e7..01157912bfd5f 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -192,6 +192,7 @@ struct fsl_edma_desc { #define FSL_EDMA_DRV_WRAP_IO BIT(3) #define FSL_EDMA_DRV_EDMA64 BIT(4) #define FSL_EDMA_DRV_HAS_PD BIT(5) +#define FSL_EDMA_DRV_HAS_CHCLK BIT(6) #define FSL_EDMA_DRV_HAS_CHMUX BIT(7) /* imx8 QM audio edma remote local swapped */ #define FSL_EDMA_DRV_QUIRK_SWAPPED BIT(8) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 41c71c360ff1f..0837535aa7548 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -356,6 +356,16 @@ static struct fsl_edma_drvdata imx8qm_audio_data = { .setup_irq = fsl_edma3_irq_init, }; +static struct fsl_edma_drvdata imx8ulp_data = { + .flags = FSL_EDMA_DRV_HAS_CHMUX | FSL_EDMA_DRV_HAS_CHCLK | FSL_EDMA_DRV_HAS_DMACLK | + FSL_EDMA_DRV_EDMA3, + .chreg_space_sz = 0x10000, + .chreg_off = 0x10000, + .mux_off = 0x10000 + offsetof(struct fsl_edma3_ch_reg, ch_mux), + .mux_skip = 0x10000, + .setup_irq = fsl_edma3_irq_init, +}; + static struct fsl_edma_drvdata imx93_data3 = { .flags = FSL_EDMA_DRV_HAS_DMACLK | FSL_EDMA_DRV_EDMA3, .chreg_space_sz = 0x10000, @@ -388,6 +398,7 @@ static const struct of_device_id fsl_edma_dt_ids[] = { { .compatible = "fsl,imx7ulp-edma", .data = &imx7ulp_data}, { .compatible = "fsl,imx8qm-edma", .data = &imx8qm_data}, { .compatible = "fsl,imx8qm-adma", .data = &imx8qm_audio_data}, + { .compatible = "fsl,imx8ulp-edma", .data = &imx8ulp_data}, { .compatible = "fsl,imx93-edma3", .data = &imx93_data3}, { .compatible = "fsl,imx93-edma4", .data = &imx93_data4}, { .compatible = "fsl,imx95-edma5", .data = &imx95_data5}, @@ -441,6 +452,7 @@ static int fsl_edma_probe(struct platform_device *pdev) struct fsl_edma_engine *fsl_edma; const struct fsl_edma_drvdata *drvdata = NULL; u32 chan_mask[2] = {0, 0}; + char clk_name[36]; struct edma_regs *regs; int chans; int ret, i; @@ -550,11 +562,21 @@ static int fsl_edma_probe(struct platform_device *pdev) + i * drvdata->chreg_space_sz + drvdata->chreg_off + len; fsl_chan->mux_addr = fsl_edma->membase + drvdata->mux_off + i * drvdata->mux_skip; + if (drvdata->flags & FSL_EDMA_DRV_HAS_CHCLK) { + snprintf(clk_name, sizeof(clk_name), "CH%02d-clk", i); + fsl_chan->clk = devm_clk_get_enabled(&pdev->dev, + (const char *)clk_name); + + if (IS_ERR(fsl_chan->clk)) + return PTR_ERR(fsl_chan->clk); + } fsl_chan->pdev = pdev; vchan_init(&fsl_chan->vchan, &fsl_edma->dma_dev); edma_write_tcdreg(fsl_chan, cpu_to_le32(0), csr); fsl_edma_chan_mux(fsl_chan, 0, false); + if (fsl_chan->edma->drvdata->flags & FSL_EDMA_DRV_HAS_CHCLK) + clk_disable_unprepare(fsl_chan->clk); } ret = fsl_edma->drvdata->setup_irq(pdev, fsl_edma);