Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp407321lqr; Wed, 5 Jun 2024 09:19:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPyOaEwj8OXXCwZWa7DzIy1lWRhCMCk78Oa+hDqZhngIuX4VBobhflJRD3pvxxjEoOZf15M16Cy7lwApgK7krUaAqadlQJP70SLF+Akw== X-Google-Smtp-Source: AGHT+IG5/WhpJPrgZ6Y2sdKCVWaej02ezXq+pyknVH4K6DZT6Ac4Z1T5No7Jlff3LSecr9y+Rnm1 X-Received: by 2002:a67:e354:0:b0:48b:bce3:2e74 with SMTP id ada2fe7eead31-48c047f46d8mr3426992137.3.1717604380511; Wed, 05 Jun 2024 09:19:40 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48be9735908si1392810137.83.2024.06.05.09.19.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:19:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=qWZX4tN5; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-202904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202904-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 247961C2390F for ; Wed, 5 Jun 2024 16:19:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC3CE18FDA9; Wed, 5 Jun 2024 16:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="qWZX4tN5" Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2048.outbound.protection.outlook.com [40.107.7.48]) (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 C3D1519D899; Wed, 5 Jun 2024 16:19:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.48 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717604349; cv=fail; b=q9qsTgddysmIxgGck5kr7g0bCOUmtD4Jox8Lppey8gUkQ2C3Za2IqheuoUsqlclgWnrtDRF1NGqgYYvPaahT3ZmAokmSjA+RnqEJ2D1KBXzEYxBX/yyB8EDI99WfYBqxvo8bkOfaHtG4W9Xpo1Y968ORES5D9nJlCOAUgW++2qc= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717604349; c=relaxed/simple; bh=9QsZlFd5a2img26Nqpg2+frudXhNxB45l+a3KaIKSJE=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=RWxDhHTEhZ4aPUtRKiq/wRJqMbsGSPzCFENzfsnrOOfG2yJ0LRQ6e6ydhm5SusJtTLOapGPkIVIXQ/bX1wJD6lR6raBZsMuF79HCktyW4RqJyBiAa96/ujocCuNE3MTdZXyPRh0SFZWrJmvFmICVEjcuFxpP4+thvkmd7l7ZhKQ= 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=qWZX4tN5; arc=fail smtp.client-ip=40.107.7.48 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LaeqbfaFXmNzZU3f6xwPqu0KWVxYNyzQWmiB6CloT/KjFSQXbes0FUwOsdvF84D9Dg8cuSgsTbnaUGVYzKDmBn6UQhkj5yb+H7QYt1p2jTn7ImLCo95ctj8Jy7RKJ2eqm+eW6AquNqCCKTqAVqk7rqnL8q/D+BnK5VIKeyTqyISbUHuyPS0IvKth9GKI93yHUZsMOQ5k3XmvRqnk31oaUyYIxSp+NUO6WhV8zDFH1pieE2WatGl02gsU6Oc/y1uhILx0VUIkDvc1RnIRhwqJFBdFfLpEcy6GHJ/N0SQeJPzOwAvpIvyPgTuLn2u06Jk0E/ysA2QUjqpskbUl8teFcw== 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=f9ooCDpKSMR5pw7gptePDTzTu6wkMgDUht61u5fZc/c=; b=CQrnhwJwmAGhxy0QKh2sQymAxtGTm8nEqxmWoI8gxHRDvD9B80CcEyLiBN+OtfGqZtsnsN+/XUBR7DzuH+wDnkS00UQotW8Kh3WMWkayWHlBu3e0XSazsdNm3p2CrIoDvKMUv99cTkn4hVCFPeszMsN5Jw2kP6DxvEcRiKLi/6oFTKSgUnA7PYPF/AmlkOIbv45GN9bowtJ3VpITPo526NcxBSVgNkPys0D1miMIdBQvTxXfg37nQmCKob5HBL9qwY9XwAxk2UKMMD3+rcuJV+MWyL/CpmvyfdM+GK+INtqHqCvf7xWNYVGF+qNSNsYiiOYDgCdI5U7lbA2n/R7erQ== 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=f9ooCDpKSMR5pw7gptePDTzTu6wkMgDUht61u5fZc/c=; b=qWZX4tN5jbunM4W+QSuNcuSUU0FqZonGGaqwOY82nN6Vs8weFiAAqGTng4bC6mFPoz1H09nXvgcY3byMk97hwmoTM7zhWo11FLPZEfWoVuT4KRhGShQoPOJvrbjM2l9lrsR7EfDWYgHq0KZFj94XRuJ6OqX5HdJ0XngL3Lm9wQM= 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 AM0PR04MB6787.eurprd04.prod.outlook.com (2603:10a6:208:18a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.31; Wed, 5 Jun 2024 16:19:03 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7633.021; Wed, 5 Jun 2024 16:19:03 +0000 Date: Wed, 5 Jun 2024 12:18:50 -0400 From: Frank Li To: Dave Stevenson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Vinod Koul , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Ulf Hansson , Mark Brown , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Vladimir Murzin , Phil Elwell , Stefan Wahren , Serge Semin , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mmc@vger.kernel.org, linux-spi@vger.kernel.org, iommu@lists.linux.dev, linux-sound@vger.kernel.org, Stefan Wahren Subject: Re: [PATCH 05/18] dmaengine: bcm2835: move CB final extra info generation into function Message-ID: References: <20240524182702.1317935-1-dave.stevenson@raspberrypi.com> <20240524182702.1317935-6-dave.stevenson@raspberrypi.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240524182702.1317935-6-dave.stevenson@raspberrypi.com> X-ClientProxiedBy: SJ0PR05CA0017.namprd05.prod.outlook.com (2603:10b6:a03:33b::22) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM0PR04MB6787:EE_ X-MS-Office365-Filtering-Correlation-Id: b4d600c2-a953-4dd6-b358-08dc857b3736 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|52116005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Bs2Eo1EyP4H73Orf4Ca+69M/7f0+89ELzHs8y7+r/3rTUMX+aqW8rdYrbHMi?= =?us-ascii?Q?2jyjdD1xTdai63jcXaDAB4SUjZoGvXRXgCxGvXn786YmTkmCin2sizCGRbgQ?= =?us-ascii?Q?hFn6itTKIfLw6HosHwpe9gq7jIRaAIt7DiweteLoUgbbApLMtQK31shdZCsE?= =?us-ascii?Q?WC93zXwi4qOHVOtzeW3ePtncivVA+1z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GbXFYQ6u3wggtJBoN+CNp9z+o1n8xIcEa3Hf1pA2Cc/uYoW/6yU1/cNuY?= =?us-ascii?Q?EBwtoutLzXlr/z6XvgkaydUYZZER/i4Rf8vpp+asKCulnD74v/kEj+sug4Bx?= =?us-ascii?Q?TYZfjQ7fvLb8SzfHmZ1xnhe01BB6cDeKxLVhtMrx67L/+J8tPCVzkztv2Mzc?= =?us-ascii?Q?4YKMBFdd+ujhR8bo5CmEwkYWMoeaB06SccUvV+1IJ14WPGfchf6xc1F4n2xn?= =?us-ascii?Q?iGiEBfxNz9FhW/CVJyw+HjYr4/bsAgiq+ZNA2dmjpiojT50SMc+0ThTFxZQq?= =?us-ascii?Q?wUxZLVk=3D?= 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)(376005)(7416005)(1800799015)(52116005)(366007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?jU26UDz3+X15otbTMRHYgWMys9HWYleAV9hOHEHmVhjn1l0pKmcQLjsh4JCP?= =?us-ascii?Q?cdeWx+f+SlX8S5DQoTqkZFRuBmpKmodm7FSC2Rekg17mBDlveTAHQV1s8BAE?= =?us-ascii?Q?cIo6xEeUH5s3d0ow8cW/1rcZlXe9h3FdyiLftVr+C1Ba2hIaeX1L8ylgWhPR?= =?us-ascii?Q?y7o5pkjm6aD5iRZLK2fou24GM+Ny6IyKR9nS27pMrBA8XW9v9Ez8PnIdW97a?= =?us-ascii?Q?uYEEMzHzAcumaNu+TdwoEzMxhPs77Jdufej3skPURSW5BNYIL4RrM75N6xN3?= =?us-ascii?Q?jti+DdDk50kEAJRkgy0MVIEQEwPhz4U697/ufCICWiWv5cMTluDX9Ycv1s0l?= =?us-ascii?Q?5u6Ojdkkb19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+8V2qxXaA?= =?us-ascii?Q?S8KFDvnCkUQ0CxyTGELn5d043NdJbnwx4aP/sCvmzQ5DO8BU8eY+GRTFzPrz?= =?us-ascii?Q?f9/dj4PX9wo/9UTF0zcMMmIQJJQtVe9DUiJ7yVD5lne5kRnyDTa7qjytfgYr?= =?us-ascii?Q?2eTkqRzMtgLBQkVmvOBl002RS1Nx8YUO0kGjYnnN1lajfbGehL/nwkQXoURw?= =?us-ascii?Q?WjcZgjcD7lyUhhYqANHE8c8mkDmtDVMmv8lV1qJVsa7nSy+fBHx5o5cAR5U6?= =?us-ascii?Q?Z+vUh5vFUDFeTU2pQdOOZ10m58SMS6um7y0JFn+5rdNLsK5pg9vsXyoGsm2k?= =?us-ascii?Q?dw8n09hSN1IIL3ZWAsvw0UF8YSTb6ZxYvz51BEFE?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4d600c2-a953-4dd6-b358-08dc857b3736 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2024 16:19:03.4559 (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: 5NvWl/6nRXcesH1zuhZJnOyIMEON2AKaxKfbflEUAcjdyq207gx27YAaBISQQYDfUfNcdu8mBNGDHmuDUxOzkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6787 On Fri, May 24, 2024 at 07:26:49PM +0100, Dave Stevenson wrote: > From: Stefan Wahren > > Similar to the info generation, generate the final extra info with a > separate function. This is necessary to introduce other platforms > with different info bits. Each patch commit is independent. Introduce common help function to generate the final extra info to reduce duplicate codes in each DMA operation. > > Signed-off-by: Stefan Wahren > Signed-off-by: Dave Stevenson > --- > drivers/dma/bcm2835-dma.c | 34 ++++++++++++++++++++++++++++------ > 1 file changed, 28 insertions(+), 6 deletions(-) > > diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c > index 7cef7ff89575..ef452ebb3c15 100644 > --- a/drivers/dma/bcm2835-dma.c > +++ b/drivers/dma/bcm2835-dma.c > @@ -229,6 +229,29 @@ static u32 bcm2835_dma_prepare_cb_info(struct bcm2835_chan *c, > return result; > } > > +static u32 bcm2835_dma_prepare_cb_extra(struct bcm2835_chan *c, > + enum dma_transfer_direction direction, > + bool cyclic, bool final, > + unsigned long flags) > +{ > + u32 result = 0; > + > + if (cyclic) { > + if (flags & DMA_PREP_INTERRUPT) > + result |= BCM2835_DMA_INT_EN; > + } else { > + if (!final) > + return 0; > + > + result |= BCM2835_DMA_INT_EN; > + > + if (direction == DMA_MEM_TO_MEM) > + result |= BCM2835_DMA_WAIT_RESP; > + } move if (direction == DMA_MEM_TO_MEM) outof else branch. DMA_MEM_TO_MEM is impossible for cyclic. Reduce if level can help easy to follow up. if (cyclic) ... else ... if (direction == DMA_MEM_TO_MEM) result |= BCM2835_DMA_WAIT_RESP; > + > + return result; > +} > + > static void bcm2835_dma_free_cb_chain(struct bcm2835_desc *desc) > { > size_t i; > @@ -644,7 +667,8 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_memcpy( > struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); > struct bcm2835_desc *d; > u32 info = bcm2835_dma_prepare_cb_info(c, DMA_MEM_TO_MEM, false); > - u32 extra = BCM2835_DMA_INT_EN | BCM2835_DMA_WAIT_RESP; > + u32 extra = bcm2835_dma_prepare_cb_extra(c, DMA_MEM_TO_MEM, false, > + true, 0); > size_t max_len = bcm2835_dma_max_frame_length(c); > size_t frames; > > @@ -675,7 +699,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg( > struct bcm2835_desc *d; > dma_addr_t src = 0, dst = 0; > u32 info = bcm2835_dma_prepare_cb_info(c, direction, false); > - u32 extra = BCM2835_DMA_INT_EN; > + u32 extra = bcm2835_dma_prepare_cb_extra(c, direction, false, true, 0); > size_t frames; > > if (!is_slave_direction(direction)) { > @@ -723,7 +747,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( > dma_addr_t src, dst; > u32 info = bcm2835_dma_prepare_cb_info(c, direction, > buf_addr == od->zero_page); > - u32 extra = 0; > + u32 extra = bcm2835_dma_prepare_cb_extra(c, direction, true, true, 0); > size_t max_len = bcm2835_dma_max_frame_length(c); > size_t frames; > > @@ -739,9 +763,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic( > return NULL; > } > > - if (flags & DMA_PREP_INTERRUPT) > - extra |= BCM2835_DMA_INT_EN; > - else > + if (!(flags & DMA_PREP_INTERRUPT)) > period_len = buf_len; > > /* > -- > 2.34.1 >