Message ID | 20231114154824.3617255-2-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2014357rwb; Tue, 14 Nov 2023 07:48:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGg3N0HzIzsaOwGLWa1IeQG0TWvcpXRaP5FvrqBpWww3UF9TCAU3ZiYy/ccngIWrYZG7ser X-Received: by 2002:a05:6a00:bef:b0:6be:2e07:5c5c with SMTP id x47-20020a056a000bef00b006be2e075c5cmr7395443pfu.20.1699976939472; Tue, 14 Nov 2023 07:48:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699976939; cv=pass; d=google.com; s=arc-20160816; b=EcimpNB+9BKDvb2WEA9JKAENhRJoRyPBTnWi478M18MMtWh6v9R7GJ6xsw8PVDzn8b ZeIQFhcLGI150sDp4nKDHtRUIEZw1hTkZFj2Y9e7ZjGMoq3GqafKFUe/tRMt8YSRkwT0 6IN+QH1BDAG+QJf+6xtyV8O58QWAJfG7fHFoBUvgeD9mNqVMUasQuxPXmpuJXbsi0MsU VMWqoT3iQmeb/qqO6iA2Pn0qbl/fcxuuixPkPVCU2zE6zIsLnIyr+3Xw7IOqzxTbjV2X A5CH5DaI9ATppAJ8W20OQ/v+YfuKfaosQ9djN4LbWVWRzMGmLjTJrxdjgXqTbiSQbimM kvAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wbP4Fa+v6IJTu7gDJeCQNNRYU86qiUHCZY8xgO5kY74=; fh=CYuI5pm0UTsAUDOsRXlVHmjVosgw8JGhuswNHlX3ytw=; b=xQ2StdkohtXT1T+EZszbQYhnQoFlA0SMMvBF4hxN3YP9/XYlAQolE9WuSjjxwGZeNw XToin7DLaIOsfEyPRt0mgpObUkez2US27AIy6UVOiHt4Wvs3y3y7JWfKxX9rfAD0ADE0 onyNBxdyTzZHvMRxSCVvBGOazOAw8ba8BatmjNvQl6NL3sweH9EHXpkBlZiIyA6/8pnh PesBnk4c0+1MGKNrzEcZNGaKzW14Lw0+r0Jdo7Gq3T5Tjp5mKxgJ5gn/uGROpzXFejLM A1azZu1qvKiU+0dluDLu0VJDijRXGHnr1vsrKh0/PKWSJPoPPKkriahnoM2Q12SCYLqa LsAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UcVaf0ad; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p21-20020a056a000a1500b0068e45c6ca3fsi8270175pfh.93.2023.11.14.07.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 07:48:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UcVaf0ad; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A9E8581068D2; Tue, 14 Nov 2023 07:48:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233616AbjKNPsz (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Tue, 14 Nov 2023 10:48:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232277AbjKNPsv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 10:48:51 -0500 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2060.outbound.protection.outlook.com [40.107.105.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F3E312C; Tue, 14 Nov 2023 07:48:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cGLFRDTW4rqST6uX7TF2jIgmO6GH7fecswFgcwoE7H81P21FfFiWST2tQhk/I0DyBx+GltkMc6M+lPSuPz70MC6KwJk4982rdO1c/fyXv2I+TMQWa5a5HQ7H2r7vGsuWTKIYfHZ9BeY/6TJh9JbJYrGfxymZw0Tih8avuazTIamOKt/zhEEolztcIrSm5bTEh3NbXYoiOgyT1DK+rGimeS9wnwPXoAHEDcF6NvpZdjzllksaGAnNI/tETutVfvXq1v7SPGj3r9pIAJ+gCmkL4d3ihMCkzatltVlYbNmz5unnT1pUi63TuBa67EIoh4ytlhrmsJ4hu/7AJTWH7SOFWg== 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=wbP4Fa+v6IJTu7gDJeCQNNRYU86qiUHCZY8xgO5kY74=; b=JCArtKjDF5AWoDvioaxSu1PoNdICTDQXrMlAlJlWEerBE2MPqPBEX2iW1wwgePyxaj5qsURMgeGs9zpR8bvfUWYRE6Ve5Sgi1CWJU3HMIijsCtv8hVcESDYz8vfO9YlpQE/e92AUZVAm+YkqpEO2tNqyQcOg44/7fN41zpRYUknJNQFcF0DYxwPIgPV7obh0WbvgEgErkcZF9tIZfEDXBNMBW/q5mYI45/z4i8thLEpRYI4hn6qsNOykecZK37Tn/54USasaoUh0+ka1cSXj0Y7UU9zV8WRjTT1+14jx9h6MJwWOKo1BdCZVVYW1FNJNo2Roe85lUDw5nD0XqzayBQ== 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=wbP4Fa+v6IJTu7gDJeCQNNRYU86qiUHCZY8xgO5kY74=; b=UcVaf0adliT0IWrKRJRfJKZ/vK9Rt25GC6TCtk3f2KluL09+fruUJIDGNfQJJlZ4oAIZHGr2zCwLWB1cqkE+YZZ8YMhGK4YPEwNeSMWrK/5V2jfbProNIaj4lKV+CS6/QO55nQmEYLvGo95jhRPi8yNSER+SUwpDvxT0ke/rdvM= 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 AM9PR04MB8113.eurprd04.prod.outlook.com (2603:10a6:20b:3b5::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.17; Tue, 14 Nov 2023 15:48:47 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::bc7:1dcd:684d:4494]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::bc7:1dcd:684d:4494%4]) with mapi id 15.20.7002.015; Tue, 14 Nov 2023 15:48:47 +0000 From: Frank Li <Frank.Li@nxp.com> To: krzysztof.kozlowski@linaro.org, shawnguo@kernel.org, festevam@denx.de Cc: Frank.li@nxp.com, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, robh+dt@kernel.org, shenwei.wang@nxp.com, vkoul@kernel.org Subject: [PATCH 1/4] dmaengine: fsl-edma: fix eDMAv4 channel allocation issue Date: Tue, 14 Nov 2023 10:48:21 -0500 Message-Id: <20231114154824.3617255-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231114154824.3617255-1-Frank.Li@nxp.com> References: <20231114154824.3617255-1-Frank.Li@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY5PR13CA0010.namprd13.prod.outlook.com (2603:10b6:a03:180::23) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AM9PR04MB8113:EE_ X-MS-Office365-Filtering-Correlation-Id: 32a6b557-af37-4f0c-6a95-08dbe5293046 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jg6c0IIBaYz0qoCJ1ZDAZwRrL9k9swP6DU+4b5yOSWHTKo8Yz2y07UqvOUNEhVWadN8NZ0xOGeHjudXCd2CVCshKDZqSEke2Jx8Hxzkt+hms1E+xg7pdCJtCf6j6smvZQwJlWUzI53ksUxUjsQAe3fZmk77a2DsTweEqaAPkO671I0SKWgZjR5qxhaWlg4P6Qs1bjUWqzkJf6cnBtzCi/82yzmjt1WVQP6hUPUPiMm3pB9UuuSZDcWbpeLtKZYJkMGIufj+24UdBg3NXEG3sjXCHPhKyhvjH7S1x10vhsAN5yELd+5MFZE0lKilcoRKdN7LJUkgOX6GgXFzynpdK6nWYQJHcQs17d/9/f0da80RU4uy5H9DOe+HR1KfkcmDwp+M42CwHvSno2WGRQa2oCbq+kXMDeEYrMQVYd+YNHtcLCLMvGNfRSfEETd02VP2hYWUvv3zm/yAcbmhjKTb6iIRAYmUxc9X0b5FgMBe5kfPWpGjPMAAzVVLRAbFed0fxwJm8PrLNdVeIl9+Rjwhd/AyHjoSwE+XSsyviUciIGwn2v3/lO7m+GBi8Vkpjz62vaduy+8PpQNXy6onB59w+w6IiCg63+jU5H9F8QOoTFEQvY/MCu5pqn7muyiUxm0UV 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)(136003)(366004)(346002)(396003)(39860400002)(376002)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(1076003)(2616005)(83380400001)(38350700005)(26005)(478600001)(52116002)(6666004)(6506007)(6512007)(6486002)(2906002)(38100700002)(8676002)(8936002)(4326008)(36756003)(41300700001)(5660300002)(86362001)(7416002)(316002)(66556008)(66946007)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: G6hrnA7HPG8TEinXNjqpa889QhOk483vPGC4PgrqdZz3i3R1Tdq1g6oBxeV1oSvIHWEh14d6EmM0ukqAFsWWv4JOGb5e8fS9dC08Ev4y8WjxhBz3sMk9LRC9qt79ddDfR1C5RV9JeiuSkYueh4SPRSv2W2X2IED8/gZnWnbBlvkhGJEoIEdBav/T3gvckk/30FdDSVaEos7R6YjB0Kd5SeQxkCaNbbaNc36uLPsG34Uk+TF2j3RUCeq6qiGmKS53kdkjUtVUy2RUlI0AC89o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RgRn5yLyBHXRf+pdANz/cG0+R/3hE0CGw6GmbCszvu6d9eLCx5h/Lb03SqzjW66Wh9Lq7cNpEF1HBvebg2ZpSxIzF46xHFdRja/cgtOzNgPCZtZlr/9S7AhFd6tQR+/ge0PPqLfaBhktCkDkokMtp7erNjnPMCjDJbaeeZbblOXShX0SeJ6SRYwF+sxS3v2m1uFYN0B5+UjBptiumDgO7fbu1cgLsE3dbZhAK4ZQRET3adAbDuwg= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32a6b557-af37-4f0c-6a95-08dbe5293046 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2023 15:48:47.1413 (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: zgNmV/Ior5IihPDOW+k719p6NVfPSyw85qMNn2gCWBz4qscpojioDQ8qSKrPXPqzyEAkFb5qLY00NL6IPoWkiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8113 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 14 Nov 2023 07:48:58 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782555018841977210 X-GMAIL-MSGID: 1782555018841977210 |
Series |
dmaengine: fsl-edma: fix eDMAv4 uart dma loop test failure
|
|
Commit Message
Frank Li
Nov. 14, 2023, 3:48 p.m. UTC
The eDMAv4 channel mux has a limitation where certain requests must use
even channels, while others must use odd numbers.
Add two flags (ARGS_EVEN_CH and ARGS_ODD_CH) to reflect this limitation.
The device tree source (dts) files need to be updated accordingly.
This issue was identified by the following commit:
commit a725990557e7 ("arm64: dts: imx93: Fix the dmas entries order")
Reverting channel orders triggered this problem.
Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support")
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
drivers/dma/fsl-edma-main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 4635e16d7705e..3ee08f390f810 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -24,6 +24,8 @@ #define ARGS_RX BIT(0) #define ARGS_REMOTE BIT(1) #define ARGS_MULTI_FIFO BIT(2) +#define ARGS_EVEN_CH BIT(3) +#define ARGS_ODD_CH BIT(4) static void fsl_edma_synchronize(struct dma_chan *chan) { @@ -157,6 +159,12 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec, fsl_chan->is_remote = dma_spec->args[2] & ARGS_REMOTE; fsl_chan->is_multi_fifo = dma_spec->args[2] & ARGS_MULTI_FIFO; + if ((dma_spec->args[2] & ARGS_EVEN_CH) && (i & 0x1)) + continue; + + if ((dma_spec->args[2] & ARGS_ODD_CH) && !(i & 0x1)) + continue; + if (!b_chmux && i == dma_spec->args[0]) { chan = dma_get_slave_channel(chan); chan->device->privatecnt++;