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-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H6BHTo+l4LSWn18hD1h9bBV4LCm0lwmop+46DdZ0eWgrhhmO7WEufnL9PSrEYugy6Vfya8BOd4M/A7BpxiyqRV2DfCKeRauycOa/i/UUl5Lm7N4vH/FnVzhCxeuRE842UNP0qWujsyex+fznhZ2cZJAfSPzqbqgeaOgnNufFnk7WYkqd5QF9ISnSt0hkbLgZ9+A9XfeVOx0b5bZrRZ0FMSPnyThWHZkGl5NM9eF05E+Biv37aCJQzHGDUwOgtB0vZInC1FWNzil0LhJhaPgnJTE9NKrFpJmW6gYQeCdjkuOE8ZrTE0SoI7ShDP/UCZ4httAFzYIacfMRjSbhbGVA7WboA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mUXoCM1Eh05bkx1iSMXIIp3oXO/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]) {