From patchwork Tue Nov 14 15:48:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 165003 Return-Path: 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 + 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 ); 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 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> 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+TF2j3RUCeq6qiGmKS53kdkjUtVUy2RUlI0AC89oNWuN/XMah7c4tc8OX+j2qK5lIKZ0enoGvcC6Vzmx3HE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eLCx5h/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: 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 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 --- 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++; From patchwork Tue Nov 14 15:48:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 165006 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2014674rwb; Tue, 14 Nov 2023 07:49:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL+hVdYG0Q8NOwJcA8496MJlsYX22HMhFQwJcPezOn3d6+gjmnKluiH0X6pP5q1mJo3l+x X-Received: by 2002:a05:6a21:a59a:b0:16a:4f24:d30 with SMTP id gd26-20020a056a21a59a00b0016a4f240d30mr13635192pzc.53.1699976972653; Tue, 14 Nov 2023 07:49:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699976972; cv=pass; d=google.com; s=arc-20160816; b=hORVgVOWcMP9ZjaG/gEwg3LtQUZErs671rdJPF+QOnFP1emeb9hlh2GIY3KHi4NCWR GAsynvam7n6lMWj8Q6UqyIgUsFcUCbfXxOB/G9GDDymDn7p+JIHlbYXDGPubGvvyU3Gp w8lm3mDasAwM0YR0WiFoKXDBzw0tGghKF4plzwGt9ppuHIM0QgZV/PuuXOfsAZiEJT7P M39h/6Q8k5k8rXHPSBqSU8uxnGS8crBGQZcGR/4tlejPs/1QHUqXCcP4wFo0uOatNoVS PaIno5M49YsbtnGBrqT7v6kqjxZgxCc+I/ZDDBw5g7khnRHNHvt1d3cV167ZI2b5Q/1O hJ0Q== 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=95cUwS0vKJDzzxXLzF7IYWyGJ9mITiC5TUqKbauSppY=; fh=CYuI5pm0UTsAUDOsRXlVHmjVosgw8JGhuswNHlX3ytw=; b=wmKsyvKbW6Gqo/xpAaHGKiUgPr9/XfODTVMK40n9xK5PF0mAWhaZ98GKt3pdVKBHqj nH/nNFMjC+ZDB9w+NQFh/rFqmWOkt/FPWSfOS0YmidX2Hz1i6e+6IXroS1Z9mnKR7qcc LQkAkWVAMnLHKSePVg4gpMZHT0pUnvX3fj5RLtsLRyGalmxSm2OptobF7I1xqHKtPSBN PjAlRY05eFm3oAc924jMxccBP242DLolSvK0FtosuFnFOPFroq3jNQoYe3KyTnC/T2Pf 0ubYCy8nbXCRGUUQIRanP6+ZSRjRUAgfqW8HkIJBuKo0nyUefm5n6w2PZUdJ7H5P2Nop njkg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="C/42wZXr"; 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:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id j71-20020a63804a000000b005bd2b2ffcefsi7839158pgd.523.2023.11.14.07.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 07:49:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="C/42wZXr"; 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:8 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 fry.vger.email (Postfix) with ESMTP id B47CD80245A8; Tue, 14 Nov 2023 07:49:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233708AbjKNPtD (ORCPT + 29 others); Tue, 14 Nov 2023 10:49:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233604AbjKNPs4 (ORCPT ); Tue, 14 Nov 2023 10:48:56 -0500 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2075.outbound.protection.outlook.com [40.107.105.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7F6C12F; Tue, 14 Nov 2023 07:48:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PVv53oJCfnOq0FLbMyCyBETDBjPmf2onPdaRQMmOFzc1bEghnC3t9OVauNrd+uINCUmpyfleQGmHLY+/daGIIFRZAClqq5HhQMkfAVf0k4rzSaPBp+AFTW9bxP4EfwrDegTpUfOLXT8FGPiUOyS9ALYf3fH1vpJQ1+CQ9sJ6LyqrFM6ZAKya0Ibggs/RvA6uWUPf+pGMD1/wxkC3RiMvsAT8JGqEzVHFz3rbyxKH8QjgO7rMLAjaaPr5dBZ6PkVnzclz93usoK54EIQAxnLpnY/TE2UdwRsJVPpnZSMDz5laXEASBF03Xld2tysq+VoFSK7j54pw6x+Neu9Bp1KOIw== 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=95cUwS0vKJDzzxXLzF7IYWyGJ9mITiC5TUqKbauSppY=; b=ghYmkenX76WwbawPKmScMIx4SbIXY8KOYyvfNfoqG/t6OYUdSqzY61Okb4liX8tzR5sRXedlfHsvOkQ0j0pacT1os15go0JA6fPQNMYhb/GUVQ6OS+UXDLwOzu/pcLMf1JnI4CnD54lZSnNc/Qi+Aj8Jn3tcUxCEqlJW/jWdt8o1ZpQ4f46pTtiv2P9w3htQt+FfTGpKPOdsvehWFbg7yWAit39Izq41q2SzaDRpY3njSCFL+1uI7E2fO2CZDGKRZPlxh57xiAvKg9XzAwM+mqaf5VA5mdTMx/GL9Wk4C39qffTLKJzTtk2Ou9Hy8A6WqzoeO3E4Fxwxb8EFA4qLjg== 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=95cUwS0vKJDzzxXLzF7IYWyGJ9mITiC5TUqKbauSppY=; b=C/42wZXrUTQx8E7TtHxELZS3btv0Ca6NEGwo3GwxJmU/t2wIJ3fgOrwlSe6m6X5KC+Bj0rSVau6fNt2qbzJAJJqfG9FBDGanApjxYk+1TrsEnYr6t10NPCNVQ3k3gvR6ulyJVs9YMZDpSP3D0n1/i+Rm744/KK4uJjdTk7JasSg= 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:51 +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:51 +0000 From: Frank Li 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 2/4] dt-bindings: dma: fsl-edma: Add fsl-edma.h to prevent hardcoding in dts Date: Tue, 14 Nov 2023 10:48:22 -0500 Message-Id: <20231114154824.3617255-3-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> 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: 1db399ea-7ed0-49f7-fc5f-08dbe52932e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7+ahv/otMtGYlufskv/n/Ucthoa2INYeXtPnB/1NCa4aL7Gnfcy7oxX+o+n6Fu2F2INk9gUz/gtW+I1m26hkwICaqFqjjM06JJ61Pi93vn7o6e1EoHR+vQ1QHGIz8yRNwS1gmoit1181p8+5Ulu3UK8yJgdbTXD4YEQKCi93SuKEWwBrU39jsLuSjL2D+F/3yzMtLRgI/luIumH9Eo9QBzPj8d93wqc/IDE1DhybcAPth9D3wDBNeg9c3caHmxiAmg8gjDzFHtvRX3agzE6xvQS9R+QKRzYRFQp8U1rbKsZHxp6JQoHCd/Gpq9QYUcGUQac6er2+Dcg2UfsCBwjyvI1rdZqMcYeoihGq/QjPMYi4tajDj/m6HKOprfUwW/hro3pJBKlrgF+TomUdzlU/LI7we5x5Qhyj3YfhP+q4vRcRj/zhH+zUcflG8L1zUqfAkY2g0sC9dr3as1aFq4LyTquZ0cgUSYFD7KBylbGdssc0s2eGTvsxqb7sAWE1QHVHgw1x41T10kRWlyDD3WBnoIsK/HfXUZ7Lb4w8KuDBgHP4kHO9HYgKwcub6aWaaTuPDGnVIbDrxI4ns635gmyVBtXblRjjSCHoxaPluM2e/MxDeBD9mKziLW3PY2netGjy 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)(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: SYwWSY3ZlPktqJQP5LeavmTqsMvMjmk1p01wOE4+63+7gsgieyYsf90JBALCek+LCkXJhMjOlc8HiLVhRZ5dEfninRsOqfY12VAVue26rf+Tgj4Am5WMu9ezGO0OUZcn0kHJRWElJarbj5pO3Bg7usPiC5BWZ7NKFGXmuvpkkpUf2EmBjfz4PnLoS7+Wqy3UFnveKFub8Fo6Ig5NvFqFXbYVynjejuhoBmkL4ybyxzLSPchqS3fYD3IW9e6Lc81iOCy/fnCkFw0YSsXlYy3voLxBwYaZT5dOHDj8Xd5rf0dpriww4/8NWSQPRgf2LwThGMyWnpKX3d6gTO3u2Sf+nKWe+QVt3bPUf+sR7XlEk3IqDYrYBHtK6Wf/pND+roIbJTvV3cHgaqLdgsW5J+/3ha9N22af4UxyLjqX7UvzEL2Saog46B9o9sAegl9qxCyeA7S7SYPvxeaKZk+jnek1C1r/uaoe9pnup+DW89G7j7mp0UY4L/6HkdKBipPz0YK6SZ76Nl49wP6qL0iIIhJ52wmzd+eqp95fp1Z2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-7ed0-49f7-fc5f-08dbe52932e1 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:51.5068 (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: qhB7SxxKHEn6S0GlKy57R6g7RfFiVcuky92//OST5yYd0wgCNHG93eg6QXz9VuCZ+c+ANdZskFwzX9MjVBloSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8113 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 14 Nov 2023 07:49:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782555054077098838 X-GMAIL-MSGID: 1782555054077098838 Introduce a common dt-bindings header file, fsl-edma.h, shared between the driver and dts files. This addition aims to eliminate hardcoded values in dts files, promoting maintainability and consistency. DTS header file not support BIT() macro yet. Directly use 2^n number. Signed-off-by: Frank Li Reviewed-by: Rob Herring --- include/dt-bindings/dma/fsl-edma.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 include/dt-bindings/dma/fsl-edma.h diff --git a/include/dt-bindings/dma/fsl-edma.h b/include/dt-bindings/dma/fsl-edma.h new file mode 100644 index 0000000000000..fd11478cfe9cc --- /dev/null +++ b/include/dt-bindings/dma/fsl-edma.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ + +#ifndef _FSL_EDMA_DT_BINDING_H_ +#define _FSL_EDMA_DT_BINDING_H_ + +/* Receive Channel */ +#define FSL_EDMA_RX 0x1 + +/* iMX8 audio remote DMA */ +#define FSL_EDMA_REMOTE 0x2 + +/* FIFO is continue memory region */ +#define FSL_EDMA_MULTI_FIFO 0x4 + +/* Channel need stick to even channel */ +#define FSL_EDMA_EVEN_CH 0x8 + +/* Channel need stick to odd channel */ +#define FSL_EDMA_ODD_CH 0x10 + +#endif From patchwork Tue Nov 14 15:48:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 165005 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2014675rwb; Tue, 14 Nov 2023 07:49:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9RGlvb2h15dwhZg9umOSjpANZG8bua5CgV+Jj7XKDQ170ftqx/hCQT5UMY0udTH2Sm9Pr X-Received: by 2002:a17:90b:1c82:b0:27c:f80a:2c8a with SMTP id oo2-20020a17090b1c8200b0027cf80a2c8amr7030234pjb.0.1699976972654; Tue, 14 Nov 2023 07:49:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699976972; cv=pass; d=google.com; s=arc-20160816; b=AfF+l4mZN0oVjlCBFodSNnP+1ZsFub2mY/9rSrMMPblo3ONVgdRI+A3XCB/9rcz7R+ UGrrpNdg8wYfFuWZF2QxHyAdGWskSakGCo0CMI3pBlHQMc0W1KOokU4b7nxEMYkP9Omg Tg+3VoOnObWXwP5bDzQpoPtS3j1I/Gf42xzqvhHJCx2ReeFBIbky9Zl4qk6/Cwp41u5s kFIw5tbMAdMjl5s/Xn+L86Pg+dgJqnubOKU0UJvsKcIFl/sBE1piNI41hG3yR/ZJfB/L KeuqDfG2ZhBTNVQp9oL+Hv9ahqmvHzomw9pU6PZP7AefvMrQ6ZuUXOKUI7WIy5Iqtjon 3FxA== 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=TfTouRTOdsJTlPyf4LsZsKYwV8Prm8sfu/+ZSbGbtEI=; fh=CYuI5pm0UTsAUDOsRXlVHmjVosgw8JGhuswNHlX3ytw=; b=cYjYJI7K38mQkR+riDTMjSNz2jjSUzwGJHF0CwHsDZtkBURXuuMq5UQJ8DMgMiEq+5 AHiYx5GMs9obXJ0nY1mPZNL/uZ/EKMH92kY2ES+ra7r0wt5TSC21KMu/2TtmHJcg25AP cJe8z2a5wU/WQheycOnIoUtqsJX/tvS3+1VaunhcnIveq3g1H7TIV3LHVcWSPwD1A6s7 ijxLSB3hAmDPhFs++6CuVVwuMVE1fW2Np5a9q7hUTST5toHl3JdjBHm/pRYKvKtOv4Zh aBwhSse8UNuS141HCLy8qvXarBfn+FkidiyStCgDLr++mBDYAUYsYUWH6pnm+ULUzieq RLyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Nk+v+sKT; 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 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id j38-20020a635526000000b005b9b45ba3c1si8060197pgb.563.2023.11.14.07.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 07:49:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Nk+v+sKT; 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 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id D5FFC803EC83; Tue, 14 Nov 2023 07:49:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233714AbjKNPtI (ORCPT + 29 others); Tue, 14 Nov 2023 10:49:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233632AbjKNPtD (ORCPT ); Tue, 14 Nov 2023 10:49:03 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2067.outbound.protection.outlook.com [40.107.6.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A29CB18C; Tue, 14 Nov 2023 07:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JBQjiF/7Fo2yOZGj29dVs1dCw4MNHzoy+yMuIkgeLTcE6iEAcTd+BWk7V19M1Jv/OH6kKFjp4jv0X7aHoMJxZWKGAVdDxHm7sF+OK1g/ODaNaLQK66Pz6m+yZqwpvTRgU6b8XHNc2SMy8m116NYOy0GFxasLiGR6nKDoKPK735GszyHAwfezYj1xVlWAA3pZn0s0FQWbgpWFxUNnEc5tvllCOPL5NkVc93h3PyA/Ujd9Z9kRJUrANXM2tjYvsdK++VubLS0teJbuIJDMfpRSCTWFN+gQZxNmoNoKC3CxidE1aqPgVs0d7wE64bOCDnCkHpU/dR95MVU0RSIlqG4QTA== 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=TfTouRTOdsJTlPyf4LsZsKYwV8Prm8sfu/+ZSbGbtEI=; b=b6f5xjiX9/9tYck3lANOVH2ahWKrX1viccChU5EO+jyg6Abhv1ytg/BkknOdpyefBrLS0nDzcD6C79c9sKFSelNxYTSHPAI3F6mc6C3IH1P/a7AHgsAtSsmrzyAlcSjTmO+J1wZ2AWeYuOFtOtcYTbKNa6LJaTdB90L4Ad2m5t2NzhHDpF3v52ybSUN9O/0pA11DHu7WidljxU2Ldd7XQesZyGuev8HXEZBwTRGXTpUluvczqMTsxYlNN84E8BdlROFW1r75CbdtpmW92DGnLc08aXET/lVwDom/XBYqYSgYqheYNeP3TkS9BfxEStd2aH3SSsNhXgkIGNS6FJ9g0w== 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=TfTouRTOdsJTlPyf4LsZsKYwV8Prm8sfu/+ZSbGbtEI=; b=Nk+v+sKTC7BRDSdfoY247coNiwkGiKZT1ll3oBthTcmKv3+RbBLyYIVm0WDWkULx53i/2tzbmndlY84j/Mi/H6KuR8SvYwFg25BEXt0xmh421I6lt6bWDX+iBSxovpyUx6nzjdALCedHqBZG8VzBiH7IAiDsml6s83WXzD/fzVo= 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:55 +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:55 +0000 From: Frank Li 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 3/4] dmaengine: fsl-edma: utilize common dt-binding header file Date: Tue, 14 Nov 2023 10:48:23 -0500 Message-Id: <20231114154824.3617255-4-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> 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: f1f10893-92a6-4a01-a6b5-08dbe5293514 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x+KPqdRbfdkxw6lY4kifDBGPrdMnDFadFQ+Mx0iTQR+Rm+O1w2pHi2If0Xze99KAgY92bb3aZlBiTaUFnxqOXwwNJEf7J9WiaISoyLSXPCrSJ0zW/jQC0yID+RKhmj4qF4/KvvNQWYW0WxjvlHLPXm+Hla0+XAO/Fh1MRrUHs88aB9pkSy0nVhhhhLuYsTXgd6mWOoutR4BZQiCja66/6QApv0/qJpzfXN6hnFdB/NfbnKUaa60wPvJen909Q1yGJyCTrQueSSV00BSJ581W9YVhpW4pDcZr8YBcilhJ1sPH+OY2nWTyXtvydt75f5JbfZAhIv9F6E88CT4FZ0Z0+LkhXyDRIOrH3eA8MItzzIo13stJSnp96yOuol3gUBjtMcxdYB3QCpvxcqjDQ6pQRnIzGxeuSNYJs08Zbpt6YSs3UXDpllf+WItMDLb8ajHmRizL5DeL7NctG6A4bO9dMrkJoEF9wN4nafxsmFx2dT6K6GuvhpLoWXQOlakDSsjkK0Qxjt3V8dXI4x8AVIFdsqvCvsEKT+76m6Fiwl0cn0yYmboVj2GDW+nSbA598jffNABEXEkdzTO6j4C9U5niWwXNAfy13wMJzGcvmJ+om0250G9ThFptkAUPVai0UunB 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-A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U2sd+9No2EREBq6q1ZgWe9GYIK2/c6kU8TfofGUQEaF3z5nmw8eUMAFqYFCtSL3OoL7AM0NYppLXqiuVMyq4mQdfHFIn9pHju6msHuGtBN1yrv2ICkt4nto5zBz6ezkrQVqdSrUpRPLfD9O4SKmhlZBifBdQbRAF7gJDMNbA3SJRfK53patgWOnfWwFc17xhlzng6Dp0739cawasLZT1p1C/Gj/vEF8M2JRMX8kfJSIyAEdCeMdpVWEFnglSP77TG5dUQ/lZLygZt2hBs0U46iYNjiMBGgXbNTLeNjXYsPthlANEt41pIO9NTAW01kghu+Q1z1id26B+bVHiLMzaKwjl3Bw+kTKgpYwvRSf/jNUd1VLvDh1dCRUC4V6eqrOOAUxP6KS8THhzcrmUXoCM1Eh05bkx1iSMXIIp3oXO/Lwo5WNmMeFQlikgvFrWz+BdgVluM5hxaoUHSK6cKauKCs1ZPGMPQWbo1LtK5R1vj2sfQ7EB5fg555uDuFFlozateFx3rPwcNSRCp5bE3Fb2hl+RRNsP4AeCExlRfvD1SYCSINdRemqhvCqfNE= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1f10893-92a6-4a01-a6b5-08dbe5293514 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:55.1937 (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: GRqCMn9pK1218/E+RiJynl0SB6KOheUwIDO7XXJwPk2iXVE9sgb97RloJOPPXhqF7T2AGrO58+wSTjcR+L/Lww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8113 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 14 Nov 2023 07:49:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782555053695442824 X-GMAIL-MSGID: 1782555053695442824 Refactor the code to use the common dt-binding header file, fsl-edma.h. Renaming ARGS* to FSL_EDMA*, ensuring no functional changes. Signed-off-by: Frank Li --- drivers/dma/fsl-edma-main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 3ee08f390f810..f53b0ec17bcbc 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -9,6 +9,7 @@ * Vybrid and Layerscape SoCs. */ +#include #include #include #include @@ -21,12 +22,6 @@ #include "fsl-edma-common.h" -#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) { struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan); @@ -155,14 +150,14 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec, i = fsl_chan - fsl_edma->chans; fsl_chan->priority = dma_spec->args[1]; - fsl_chan->is_rxchan = dma_spec->args[2] & ARGS_RX; - fsl_chan->is_remote = dma_spec->args[2] & ARGS_REMOTE; - fsl_chan->is_multi_fifo = dma_spec->args[2] & ARGS_MULTI_FIFO; + fsl_chan->is_rxchan = dma_spec->args[2] & FSL_EDMA_RX; + fsl_chan->is_remote = dma_spec->args[2] & FSL_EDMA_REMOTE; + fsl_chan->is_multi_fifo = dma_spec->args[2] & FSL_EDMA_MULTI_FIFO; - if ((dma_spec->args[2] & ARGS_EVEN_CH) && (i & 0x1)) + if ((dma_spec->args[2] & FSL_EDMA_EVEN_CH) && (i & 0x1)) continue; - if ((dma_spec->args[2] & ARGS_ODD_CH) && !(i & 0x1)) + if ((dma_spec->args[2] & FSL_EDMA_ODD_CH) && !(i & 0x1)) continue; if (!b_chmux && i == dma_spec->args[0]) { From patchwork Tue Nov 14 15:48:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 165004 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2014671rwb; Tue, 14 Nov 2023 07:49:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAmOAfRydTvSk+GCdlTzvu/UZlxg2L2lNTbAvDwigjrVPVFQf3dUbGtfe7jt69r6knQ9oO X-Received: by 2002:a05:6808:211c:b0:3a9:bb4f:9efd with SMTP id r28-20020a056808211c00b003a9bb4f9efdmr12891042oiw.29.1699976972639; Tue, 14 Nov 2023 07:49:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699976972; cv=pass; d=google.com; s=arc-20160816; b=WnIdn20uhIVxJxpMJINXbV4a5Pbgpac7BIuf+2nStyU+cY+/XelgliHgPKPwzLTL8o iyBPADWNY5WH2BZ0iJiEt3BSmH6RjidsOpfL969OVv7qfik2Y4UuafeYfssqtmJlOlkk m+gPxc2Dn2Oj6gHMUnwptJ74HBJCzoiK0ao2FMSi5iPqDF9HqWlcUOVuRnyKWAtlyrOJ 0prx3AFMIsiisZlnnvEeQBpBEPTw9/WpWufImYyWMTRsIalIXhpwCDT3jekQJdZiG/e1 QX0FkmnBTIMqSVPdofbBXxfzXGvJ8/L13sB0VBQGfu5XzOs2/3ukXnRmTkkHOQ1UVgcd kfLg== 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=uxdH3nsXBgcDAIR9AkVzdF+sl+BFzEQbk+JwUbgHX+4=; fh=CYuI5pm0UTsAUDOsRXlVHmjVosgw8JGhuswNHlX3ytw=; b=Rs3oJFh4GNyIL+laIjcovHcVxrsKis+NOn+LDHh+H2fXql8DOv3K45I1EED/mXI9O6 Ih/5MTgPmzpvsSpLoIP4Mfr2mibZa/iBVxtrbGOm33vX6xWFDyCniV6r10m2OlOvWvP9 ya5UbXg9X1SaIK1ry/nt15ohS8YXBF0dZkkMoFxvBsf6d9JFuKXhMZ8oSNHVCzRj/ju6 VjgFVAJGuML2sOnldG7yegwRw97DkMp2h1igYoHwzyJVh6xmTn0NhMwnysTZtHqDpEOb 9E7A6yEYFAXYEO101WVDGq8gTJ/k+x0WIz4qENYto0a4s+tpVMXlxwbxGRPYOncQPTzw 2g2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=QMrzt4x3; 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:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h10-20020a636c0a000000b005be1ee5bde9si7687944pgc.295.2023.11.14.07.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 07:49:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=QMrzt4x3; 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:3 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 lipwig.vger.email (Postfix) with ESMTP id 568D880C8763; Tue, 14 Nov 2023 07:49:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233746AbjKNPtM (ORCPT + 29 others); Tue, 14 Nov 2023 10:49:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233727AbjKNPtF (ORCPT ); Tue, 14 Nov 2023 10:49:05 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2055.outbound.protection.outlook.com [40.107.6.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 434B2D43; Tue, 14 Nov 2023 07:49:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WWIuZmiaAL1N5DnRpL/9TWobJ31NdFlq/CnOEcxyrIrdJAeZcrLvh/hTGXOOzsHeUzwDnEoRByNVagmbIDE86HYKOzK0IDuauLhFjY9n2+/z6gyaQJLaS4GtVxMtF5Npe7oKz9v8S8nVdGn6Y9w442hR4rUTlDn7yW7garPb1ZK5+26Je9J7271il2Hjyr0Zyj/W3heMnZP2Jc0nVUONb+VhuzUdDPOodKek7ADPLvmL4Vp4SzL24t+zVXQKJwrX7QCFiBDaMqnv+By8qWfpUdtlRdrKTZlqXEmB2yJrSOzKOkKZ1WJltO+Sx7UJllDxLFAQopKUzulf4HyJ+VE6lQ== 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=uxdH3nsXBgcDAIR9AkVzdF+sl+BFzEQbk+JwUbgHX+4=; b=dbZk37galVTwckuhrCqTJ9PGri7Wo6RKp8u1Khk/2xXMSMYagVp0HVm07p639OfDG3IDXC0aNnIpEqxKg3swxFNo3hGHzElXFNPcaUfjT6vazH8MRJvjmFB7M7CZe5w5RntxZlR6tTjpIApSwD3j1StzTnDfrP03DOerPuYsbd4txG5yptGB2/rvk9eiKqV8Ag2s/InKmftHOURIbwHspPXmFWBuQimmqd0TPC4/nV3AOH0v2BiM6NTEWqCOfSO+qKRrgssVbx3RnmwdHvN5AQ6Qekx6GQXbsRPObdOEjblrR2J+1GsfN9Lj+w1ouxB82HUC/YNeK51XF63Petb4hA== 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=uxdH3nsXBgcDAIR9AkVzdF+sl+BFzEQbk+JwUbgHX+4=; b=QMrzt4x3BgoUBl4i0VMOjBqUwBGgU81rLBah87rn/YoJbcg3Cg0z1GxNCcBO7xG6xDhAspGY0r6prerOfQLNCIKKw90l+c0QWMpqaPjMEuwsZWHW4anDV55aK/w6HwnvA/vesybs5Cz0fM9RPU1mM48OxdjV+B94cK2+C/AXirs= 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:59 +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:59 +0000 From: Frank Li 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 4/4] arm64: dts: imx93: Fix EDMA transfer failure Date: Tue, 14 Nov 2023 10:48:24 -0500 Message-Id: <20231114154824.3617255-5-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> 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: f261359b-e079-4001-9f4e-08dbe5293755 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VbfDgHyMAXvvgC53mpAb+qdgAxRhRUeRrR2tf9LoywGhJM7YKNhd0+jpmaSdbvW6SeBLMD0/7Zk+QOw3yCJ9p8LgzkIFIvzHv+0lH3S+0Cxw1KBbY4dZe2pyHj/54pn+9T/5BN7Wh/h2P5ctQSD5bUeReFoLJYHJKKnSd/ewSC7sNcLIUdDWdNt7TnDRTv7TceWpy6h9JMZKKfWDyyGI8sDT+iOcmph/7wGTsNrtWMvBEykFSPmtWohGOE4l5nvgeQf3dFpI2KaKYfsI81ImE0AHLyKkCi2dkCau4bpg6NAVcmcq/w+k1KI+j++nxCDnHjLeH1zNjsR8b8I0vb1FN1ywGqLKkIJ2E8WQTGMIife5AkSJlM0GGeRBbuZQmRECsM8gtpchWFLCG/rik7h1ddloG2WKii+CBWut7IIzFnYiwvwOuO/spQKQVW5xRE5Z32rs5WYNYQvERV6KfgzD1CvkcEQKPI9hAXNyQ7ZVX7Er/8PsLb1oaAVmxXHt9dL9bNW4Pdrr6j6ZDw603TAhpksbwgRlRTizqd4b3Pv2mHze84ltj2xgOSEGwFpHirgNzroxRZ4GLGSonfpyWwnlbxWDdOLtFoBYAGa0mKyTKFsLAvXf90TNBVBz4CmSoNV0 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-Ant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J04RhfbQu8lqaJd8ERjDLB0FQBdovXBO7SljtWsFWyksPlkYRAmPmDADQOID8eX5qkrNZE9kdf8u1l5NeRscCHOrD8HoNqSKb40yt2g/mAH+ODCyirHyhmgeK4Yte9n2iH/VT1pzoHLJMle9acLCJ4bTMDnuWVJOeEH+8PkgnQtaIQYntBMgLRsciDbegTphsUXF7mxj0eqs0YHhVNTPPK26CkS1TiikG0cHY+dfg63VXL8d8QP/39Dw1/Y5FXQW8j/j6uGVgEUs4sATBmtGDPRvCMlh6BT/5dHU2jcUETIfolGTiCyNebM2v8GdjZv6KyyDp+0UTstT8Wd1Bju9We12DILfV4okIc9iT3LRmL18qIzlcW40iFOioiI8TGKs66EC5SYd/pXftWX4ypF03sLSzCEkwQzMCPFd4KegkFFimaH5FcP66KJJ6m+lLz3pLIr2X7xIbO+Mz2jEtVJA8RQTXI4d4HBy9ATbAteK3kN+HdLfgP0t1qbY0ZtZ8= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f261359b-e079-4001-9f4e-08dbe5293755 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:58.9537 (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: vsGD1iqtLjK5nUMDOcWdSTCjqDhbhmcOFNwCUv0uaJgPm4t+WM5q/3fxwvQW+WbI76fFAtavBC+VY1KLoid/Kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8113 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 14 Nov 2023 07:49:27 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782555054158840378 X-GMAIL-MSGID: 1782555054158840378 The EDMAv4 has hardware restrictions, requiring some channels to be allocated to ODD and others to EVEN. The previous eDMA driver did not account for these restrictions, and it worked due to the order in dts matching the requirements. The commit below reverts the rx/tx channel, triggering this issue. Adds channel requirements to the dts to instruct the driver to allocate odd or even channels, ensuring it is not dependent on the order of rx/tx in dts. Fixes: a725990557e7 ("arm64: dts: imx93: Fix the dmas entries order") Signed-off-by: Frank Li --- arch/arm64/boot/dts/freescale/imx93.dtsi | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi index ceccf47664407..6f06ebdcb2513 100644 --- a/arch/arm64/boot/dts/freescale/imx93.dtsi +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -670,7 +671,8 @@ lpuart3: serial@42570000 { interrupts = ; clocks = <&clk IMX93_CLK_LPUART3_GATE>; clock-names = "ipg"; - dmas = <&edma2 18 0 1>, <&edma2 17 0 0>; + dmas = <&edma2 18 0 (FSL_EDMA_RX | FSL_EDMA_ODD_CH)>, + <&edma2 17 0 FSL_EDMA_EVEN_CH>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -681,7 +683,8 @@ lpuart4: serial@42580000 { interrupts = ; clocks = <&clk IMX93_CLK_LPUART4_GATE>; clock-names = "ipg"; - dmas = <&edma2 20 0 1>, <&edma2 19 0 0>; + dmas = <&edma2 20 0 (FSL_EDMA_RX | FSL_EDMA_ODD_CH)>, + <&edma2 19 0 FSL_EDMA_EVEN_CH>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -692,7 +695,8 @@ lpuart5: serial@42590000 { interrupts = ; clocks = <&clk IMX93_CLK_LPUART5_GATE>; clock-names = "ipg"; - dmas = <&edma2 22 0 1>, <&edma2 21 0 0>; + dmas = <&edma2 22 0 (FSL_EDMA_RX | FSL_EDMA_ODD_CH)>, + <&edma2 21 0 FSL_EDMA_EVEN_CH>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -703,7 +707,8 @@ lpuart6: serial@425a0000 { interrupts = ; clocks = <&clk IMX93_CLK_LPUART6_GATE>; clock-names = "ipg"; - dmas = <&edma2 24 0 1>, <&edma2 23 0 0>; + dmas = <&edma2 24 0 (FSL_EDMA_RX | FSL_EDMA_ODD_CH)>, + <&edma2 23 0 FSL_EDMA_EVEN_CH>; dma-names = "rx", "tx"; status = "disabled"; };