From patchwork Thu Jul 2 15:08:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11637907 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5AA7014E3 for ; Thu, 2 Jul 2020 06:55:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 335642067D for ; Thu, 2 Jul 2020 06:55:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BzZoXKgL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Hpdx64Uj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 335642067D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y4oNgHCW9/hTbLhb79tVktM2D0k6+uCJa6OGK3SLHi8=; b=BzZoXKgLuBXJ+VTKXZZaZnxL/ aBsTxBg9ITDpCGK/WeMgbrZ6I7WNPS4VM8t/ECoEioml+qBqIg+XVfNbzSlNb9C1VGKNS005dU0W/ aj3u6OTjaQ6xHnMURo8rZTaAhtYiBmSLX6qsOaDpREsPX1YimhbsN4dOotY89tfHihLtzHNPnsnps eS1dLSAICXhY+lItfg+RL7MguoGB1Drxgmcr2ahGFL0iJqhVQdAR5puG7fZkdsROwqqdTyfVrx+2A GReXlpOGMtH93ce91E+6p3XUhJRdBBid6jIsknWIRc+kXwrGvxfMFhrdUYuA+1EATfxif5tq3LKrS tUbez0aNA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqt6a-0007iQ-7s; Thu, 02 Jul 2020 06:53:56 +0000 Received: from mail-eopbgr70042.outbound.protection.outlook.com ([40.107.7.42] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqt6Y-0007hI-3b for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 06:53:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J9dYi52Y3n3eVQ8Rg2KeSHKI5LfknvAVfgf8dupb/YqggYHT18ih+O4hsUW45LWHAN2lJiAi1cH7UiqQJAK4FHek2ijdnJVy6m5H9FzvtpSKLOgFUPdalfgVn63ggtblNlP5x6yYvkq0apH0D73R6EerytaQtZUAhSYia2DpuWiKH/9dfZ9BbA9RPbK+fIOU4UF0ObCKcU1sWPtdwcC0X6XNF/k5bfuXs5K3u5A5YwHBD0EWaKIKlQu5puUhs8g9eK5J3co88qpP2O5+Wtj8+hqZcY6YaF4DLtZzkCNuVRQk/xTo3FLzxO6zp7MT+KvX5FfbpUK3GCBFzv0I9VLpQQ== 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-SenderADCheck; bh=jlMSjTLc9bPxAbh3RbYyMXN3owo0JtZ3jcwGfsNozXA=; b=aED7sQEYmTy9A0BXRUP7fPV5n6ZssF/ypnpvsM7idmJGFBFq1Sv2WeiZTWmiev7PslIA+Xxp5Mo2Zobrf/Gfsjz/eZ92IbmdXrZB3YPPbjR2vgDrPpg71Ns6JS6JYHgoIuOz0i0EIMhr5oQOV9d3W+1zitJ73ESpAjA935fzWxD344mevg0z9fNdBTKT/bYFhmK5PKIL2fi3TOvHpj9JNSWxbTQopd4GPLo2VWBs05ff3qFwPoUgRkequnYhpT84F8jrIZBK6ur5FiBhjuDvErvK0Wtks8meP/j74tPDw7H2KadCeopH3y+WMEFPJt51mlcI5gQdfLoADwsztgs1ug== 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=jlMSjTLc9bPxAbh3RbYyMXN3owo0JtZ3jcwGfsNozXA=; b=Hpdx64UjPban/UyuUlQrFJQq7FSC9vBMb1QexqJiWxbLTlvoIggcGkMRv/k0TFUxhcRvKiV9P6lmuoQee8+K9FU0eh5IHBlowKFqIammI5fXiWxgeqtSBexQSrPPb8zxQoL8ZWauyu7Msy9YrsHJE79jy74onudO/zw1BMsRYT8= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VI1PR04MB6943.eurprd04.prod.outlook.com (2603:10a6:803:13a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22; Thu, 2 Jul 2020 06:53:51 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::5cc4:23a5:ca17:da7d]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::5cc4:23a5:ca17:da7d%6]) with mapi id 15.20.3153.024; Thu, 2 Jul 2020 06:53:51 +0000 From: Robin Gong To: vkoul@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, dan.j.williams@intel.com, angelo@sysam.it Subject: [PATCH v1 3/9] dmaengine: fsl-edma-common: add fsl_chan into fsl_edma_fill_tcd Date: Thu, 2 Jul 2020 23:08:03 +0800 Message-Id: <1593702489-21648-4-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593702489-21648-1-git-send-email-yibin.gong@nxp.com> References: <1593702489-21648-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR01CA0172.apcprd01.prod.exchangelabs.com (2603:1096:4:28::28) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2PR01CA0172.apcprd01.prod.exchangelabs.com (2603:1096:4:28::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3153.24 via Frontend Transport; Thu, 2 Jul 2020 06:53:46 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cf1067fd-40be-4ac3-d72e-08d81e54ad86 X-MS-TrafficTypeDiagnostic: VI1PR04MB6943: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-Forefront-PRVS: 0452022BE1 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 195VErfdgA9OiYJ5+G7YE/o8sahrp6Jww8+rYyDJQC1TzxBXvkNld2Qs3hNKnmhcMrHIX38GK/lDmqAKZGrMKCAfzxs9tUzqNx34dW3M/HAkvjOun6CRoCUhp7IVrY3MOim/mvkYvSYd/Y5XCqctOg4SDuY51EojDwUo1CGGxnxQ26VxDVtBeNfNaBnPJoFLpBGL3X+5vnq3JZY1HS67TEtMLAxAeXXloIRtLkDm+9Ysy807HOAiDkJR/84pxAC2yuFlcRgivFpOnYsY7TbtsDaaTPtxIQLVMOcp2XBxQ6ePJkHgpHdD6KF2KBaYFQzprlChSErgg01qyd/ojKTm8g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6638.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(136003)(366004)(376002)(39860400002)(346002)(83380400001)(66476007)(6666004)(66946007)(66556008)(52116002)(36756003)(8936002)(2616005)(6486002)(956004)(6512007)(186003)(7416002)(4326008)(26005)(2906002)(8676002)(86362001)(16526019)(478600001)(6506007)(5660300002)(316002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UnOjNhF6gqP27lbfNKEQ4kz7meF54Ojzq9sS/Vpny4f1n9QyOOWsNLy7RJc+fu+8qzju0RIHGUzHpt5XwAVTdrpdYYH7d8XunD1i16ZLKnZCdBcPbWbI4pDlElW6zo/3dugIiqbXOJ1+sN826NoblNJA/840J5cBO5bTlK0PX0SMTMS1M4idnA/a/qyAR6FUpJdKkbOrhVZnIDG+lB53bwSF3B1jxUZiwXaSs1u60b42ywjRwReBrGWYbQ/YWwyUwLfc+OIwNgjyEjn3/NpIqwB4I+/RnDEMHKKOI95h1cCEtGuWCPFHx40iuFd4C472aDP3USn3iY8UD+TgbTspgcIqjpQYAfcdGxLwkdDssOyMIzSyrV1QWcjT9TW+7Yi03oRGst7kTnW76BVGugEV50T4vR89EbewknBOIfZwBq0pJxNaFtG1nVt0lq5ghKCOIvfuyXTFcj8JavCbbkV5ej3q2jdDl7/CWOrx3p9jXXo= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf1067fd-40be-4ac3-d72e-08d81e54ad86 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6638.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2020 06:53:51.2935 (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: guxq8xHxOE4pKWhzlG3R07Pzd23A90D0tgRmS1ERZoWMZBqkxhyZialomvychMv6133AWIOftpxJ2CEF+T7O4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6943 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_025354_157287_C0A6068F X-CRM114-Status: GOOD ( 10.73 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.7.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.7.42 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org For preparing for next edma3 merged so that any member of 'struct fsl_chan' could be used in fsl_edma_fill_tcd. Signed-off-by: Robin Gong --- drivers/dma/fsl-edma-common.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index d19e8a8..6ef083c 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -376,7 +376,8 @@ static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan, } static inline -void fsl_edma_fill_tcd(struct fsl_edma_hw_tcd *tcd, u32 src, u32 dst, +void fsl_edma_fill_tcd(struct fsl_edma_chan *fsl_chan, + struct fsl_edma_hw_tcd *tcd, u32 src, u32 dst, u16 attr, u16 soff, u32 nbytes, u32 slast, u16 citer, u16 biter, u16 doff, u32 dlast_sga, bool major_int, bool disable_req, bool enable_sg) @@ -504,9 +505,9 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( doff = fsl_chan->cfg.src_addr_width; } - fsl_edma_fill_tcd(fsl_desc->tcd[i].vtcd, src_addr, dst_addr, - fsl_chan->attr, soff, nbytes, 0, iter, - iter, doff, last_sg, true, false, true); + fsl_edma_fill_tcd(fsl_chan, fsl_desc->tcd[i].vtcd, src_addr, + dst_addr, fsl_chan->attr, soff, nbytes, 0, + iter, iter, doff, last_sg, true, false, true); dma_buf_next += period_len; } @@ -569,16 +570,16 @@ struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( iter = sg_dma_len(sg) / nbytes; if (i < sg_len - 1) { last_sg = fsl_desc->tcd[(i + 1)].ptcd; - fsl_edma_fill_tcd(fsl_desc->tcd[i].vtcd, src_addr, - dst_addr, fsl_chan->attr, soff, - nbytes, 0, iter, iter, doff, last_sg, - false, false, true); + fsl_edma_fill_tcd(fsl_chan, fsl_desc->tcd[i].vtcd, + src_addr, dst_addr, fsl_chan->attr, + soff, nbytes, 0, iter, iter, doff, + last_sg, false, false, true); } else { last_sg = 0; - fsl_edma_fill_tcd(fsl_desc->tcd[i].vtcd, src_addr, - dst_addr, fsl_chan->attr, soff, - nbytes, 0, iter, iter, doff, last_sg, - true, true, false); + fsl_edma_fill_tcd(fsl_chan, fsl_desc->tcd[i].vtcd, + src_addr, dst_addr, fsl_chan->attr, + soff, nbytes, 0, iter, iter, doff, + last_sg, true, true, false); } }