Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp477036lqr; Wed, 5 Jun 2024 11:17:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8ZgHhrjAmEbe7+QoWoV3FW6yLww7JOoh3gS9+pX/zaG90XkF5yKzso6u72fRMpAqQBkoyNEdyb6thltbOnDct/rspXNU44GVFCb28pQ== X-Google-Smtp-Source: AGHT+IF0BAGvJHxOuFCC3cL8VN+3M8F0e8eKj0BZ7x2rn+X5dTmkBy+iHX+l2P9Ui2c8T/k2tPMM X-Received: by 2002:a17:90b:2d0f:b0:2c2:1d86:f785 with SMTP id 98e67ed59e1d1-2c27db694damr2940181a91.47.1717611422305; Wed, 05 Jun 2024 11:17:02 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c28069c2fdsi1631846a91.131.2024.06.05.11.17.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:17:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203039-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PiBFllur; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-203039-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203039-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 99486286A7E for ; Wed, 5 Jun 2024 18:12:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0E8314B083; Wed, 5 Jun 2024 18:05:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PiBFllur" Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2068.outbound.protection.outlook.com [40.107.8.68]) (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 5E6B91465BD; Wed, 5 Jun 2024 18:05:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.68 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610741; cv=fail; b=hUhX2XK3VTUE7PyeltEnqe3fMcho0b5fJrpduwvqAEv2uk17Kfg9NOpejycgDApdI9Yth2YXT19Ogd1UoFP78F4MonR3KeGGMt/MCrhpWDnp63/Hpur40IbskkBPL7KcUnbg8zlQRH4g1Ts5r6TE7koWg0lQ9i/LbXtKAuQXo20= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610741; c=relaxed/simple; bh=6jfq3mxHbm5DbUpB6QbrGy6rsjJwoOJdP3tPQ7GPq8A=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=BTqfEP/Aw8d33VnRpn6oqCXyVSaejbl+qtHoP8Zws4lleiNrfBJcVePNtXwwjjJEd0HlQTyWMLjMrI7WSvBaXNU+m0cQwFodW+j5IVmFb4q7sSWjuqMUtH+v5BHsNnRK7klt8M4rLJOY3F7qZgpmrPacenkwd5yzElafVyLTQUQ= 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=PiBFllur; arc=fail smtp.client-ip=40.107.8.68 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=d3Ic2wY1WEu4UagyCoo3PVyk8OPadR3wyeUcGb6LFQjTe2/ZTo9omUCgXAhh2B1LLXwXUQQz/qAFaR6Gc6VTnKubaQYrZ7JVXTEwuAHTQF587KDao9qYlI6TiApirVGW0nGdxvX96+hEAb5SJRavcUNfCuJNtwdjk+0Iaw2NnFhBpHKNKwzusIaei0nxuUfj7KqbdYBQNW6CHedS++kOQzX1hR/YoqXZnq8Mih9qEvR1L3Mwkqvnn9RsgVsM1U5z2xH8gC5CSsHsB0lJqLLVpFNFK3Gp6D5Kxrx0DiPLgIUyp+l/tcjW6zCBDwGnV0upszuqez1C8q532ETens7NzA== 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=ZEAGB/5UT4Ezk3vxcZ4vlToqBwLjbkVcJ0idUn+wLvM=; b=lmNZAKK2lc4io13L5hlsNFRZfluNPovkpPA+G1mYZkrOA7ZbB6TgWZFQCHJdBxWUWylcG8C0iD75TxTiZTa1r04CCpBdZZbHenZPMrhiSK7zuwa5buGboRwppGlEPviid1TkihLBcU6hRwSBSmmJfjNMilbPBhYBhSd16gMjjNPoK8eGGNxT+zBAiBORrFa6aca4MQ3R4ihQ1mskx/9GUYSVRFdwmDmS/joHbXAMIytReTA34SkofILJSHgRxhVs3tE8uAUdYT4/WM2sJz/z+OsjB1DC2Y5MNAuxB/sa5AuXzDG+v93l5zgaZi+COlAsoBkOI9bPZGuooqgyAg1vkQ== 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=ZEAGB/5UT4Ezk3vxcZ4vlToqBwLjbkVcJ0idUn+wLvM=; b=PiBFllurxt86osrfpAaSLdBf2A9ShfbVA5UcI7JczeOuf9dnbdQ8u0EZsmdgpnt/PCORxmWRj7cgo7WPptE+3qTrYNmNL99CFQF7AglsB36f8paEFb2Ss2awmrsATdtLmL7/ALi1RDETCA7IX6QAZ8hATqQtY5Nbawr2XvcBWaM= 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 VI1PR04MB6832.eurprd04.prod.outlook.com (2603:10a6:803:139::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.30; Wed, 5 Jun 2024 18:05:33 +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 18:05:33 +0000 Date: Wed, 5 Jun 2024 14:05:20 -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 08/18] dmaengine: bcm2835: pass dma_chan to generic functions Message-ID: References: <20240524182702.1317935-1-dave.stevenson@raspberrypi.com> <20240524182702.1317935-9-dave.stevenson@raspberrypi.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240524182702.1317935-9-dave.stevenson@raspberrypi.com> X-ClientProxiedBy: BYAPR06CA0018.namprd06.prod.outlook.com (2603:10b6:a03:d4::31) 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_|VI1PR04MB6832:EE_ X-MS-Office365-Filtering-Correlation-Id: 0319b694-fbbf-4ed0-aede-08dc858a182d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|7416005|376005|52116005|1800799015|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?KMqGrDQ9QlQQnD1sZ59EES6CMkEoWFnXYsC5WW6hrSvEPQBh4MRTN1jlve6k?= =?us-ascii?Q?PYktf2NuSD/b14cyR1QT/En4RmEItIFFPWsOZcw0/on4J+dx5NfDmpqmZe+i?= =?us-ascii?Q?lHbMoKSDKZomAZItY2w8+ezEtC3SNrtYuikTq8+KHfCBJIiiGRzy26FKb9pI?= =?us-ascii?Q?OxRovINM0r4lCD2t2WKkhz9eTczGN8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K+ckaa3mHURpwVjANPLX0LNCkOZ0K69NOOWFbddv9A9G?= =?us-ascii?Q?p7b3IgRj9sBhhH/o3ez4zgEF+V3rQSuv68QkSh9r1Lb5YolSWb3T5nE4IEe7?= =?us-ascii?Q?RBkY+nUaNsGDKA1I16jlpepbjkk2iGmYvxYfIzw/ZY//9//uk1pHlBqUT+46?= =?us-ascii?Q?aoANpDS6UErCk+IyjqyqhEFCz9RyZwX+e7o0NcPm9yJBqJ2IDAzRI495g+rV?= =?us-ascii?Q?IJ/tg3v5soCfz9pBZ/ENH89oQwn7E33puajkXXJg359uFA=3D=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)(366007)(7416005)(376005)(52116005)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?m5yDdZD41BFVCa2kZ7u764hjXcWyZ16fmKckUaILteKV1rz9hXIMwo6LErvs?= =?us-ascii?Q?Z2IL9D0Re1/caOtV9nNdqD/KQ17IZsSgy6N60wXaDoRgrf/mSQv/EjCZJHxX?= =?us-ascii?Q?maR5ajQOQWFyFle63I2TS+n1xQ9bzz4FWiE56ODvBEQIY/Soxs2+kdxUiLF3?= =?us-ascii?Q?X/WtLjzA2aCSqxeaTWsM89MyDIHx6hAEmyj9KeKBtgOFqQzXsaqLm2XAfObf?= =?us-ascii?Q?NMkdD5wouUh4kAdSX7o0rzLnOG58bV+tQNgT3PqOgA/AKz8SC8BO1LDV6Xa9?= =?us-ascii?Q?FsaW6/PKqRhBF293kFUE66NQ5U70DW4IZZCeI/hY034JfURxfr5d7rVXHVXP?= =?us-ascii?Q?mXbUngB2dXfmtOkrED5iDxtva0a4xghQAxBhM126rOzeA8rvu41MD74fkuwZ?= =?us-ascii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5/iBTXT?= =?us-ascii?Q?rQ7KwUhONQRRAbo21LRAbKOnU8i/gPGxueUyclhIA34xs8j4gy27FDi4E7pQ?= =?us-ascii?Q?a5zWpGeiUA7Cw1sdYvF+HR7v+jzBUFY7+LaT4iMzYStmyJ6EgbFfedZrL0n8?= =?us-ascii?Q?I28NqU2lJJyOGACWWX3K/WfWDtXdY8JFMzDBX2Sm06wq6Tsb+U8ae+YkoiAK?= =?us-ascii?Q?Gt0Y7yHqumGcrzUmXzQ/7q370EflQo46Ft7bnheh+AE8J+qpMruSkqhBS5FU?= =?us-ascii?Q?w6Oq4fDmkIeyJ93j1Aw=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0319b694-fbbf-4ed0-aede-08dc858a182d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2024 18:05:33.8432 (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: V08tGu04nPFoB8QDgQsT5CeNqZoesHSvcRfrVf22hbyGwb+1hCYTnKa7oIbZYaapmbr9FzJ4qnS498ADRLbO7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6832 On Fri, May 24, 2024 at 07:26:52PM +0100, Dave Stevenson wrote: > From: Stefan Wahren > > In preparation to support more platforms pass the dma_chan to the > generic functions. This provides access to the DMA device and possible > platform specific data. why need this change? you can easy convert between dma_chan and bcm2835_chan. > > Signed-off-by: Stefan Wahren > Signed-off-by: Dave Stevenson > --- > drivers/dma/bcm2835-dma.c | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c > index e2f9c8692e6b..aefaa1f01d7f 100644 > --- a/drivers/dma/bcm2835-dma.c > +++ b/drivers/dma/bcm2835-dma.c > @@ -288,12 +288,13 @@ static void bcm2835_dma_desc_free(struct virt_dma_desc *vd) > } > > static bool > -bcm2835_dma_create_cb_set_length(struct bcm2835_chan *chan, > +bcm2835_dma_create_cb_set_length(struct dma_chan *chan, > struct bcm2835_dma_cb *control_block, > size_t len, size_t period_len, > size_t *total_len) > { > - size_t max_len = bcm2835_dma_max_frame_length(chan); > + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); > + size_t max_len = bcm2835_dma_max_frame_length(c); > > /* set the length taking lite-channel limitations into account */ > control_block->length = min_t(u32, len, max_len); > @@ -417,7 +418,7 @@ static struct bcm2835_desc *bcm2835_dma_create_cb_chain( > /* set up length in control_block if requested */ > if (buf_len) { > /* calculate length honoring period_length */ > - if (bcm2835_dma_create_cb_set_length(c, control_block, > + if (bcm2835_dma_create_cb_set_length(chan, control_block, > len, period_len, > &total_len)) { > /* add extrainfo bits in info */ > @@ -485,8 +486,9 @@ static void bcm2835_dma_fill_cb_chain_with_sg( > } > } > > -static void bcm2835_dma_abort(struct bcm2835_chan *c) > +static void bcm2835_dma_abort(struct dma_chan *chan) > { > + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); > void __iomem *chan_base = c->chan_base; > long int timeout = 10000; > > @@ -513,8 +515,9 @@ static void bcm2835_dma_abort(struct bcm2835_chan *c) > writel(BCM2835_DMA_RESET, chan_base + BCM2835_DMA_CS); > } > > -static void bcm2835_dma_start_desc(struct bcm2835_chan *c) > +static void bcm2835_dma_start_desc(struct dma_chan *chan) > { > + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); > struct virt_dma_desc *vd = vchan_next_desc(&c->vc); > struct bcm2835_desc *d; > > @@ -533,7 +536,8 @@ static void bcm2835_dma_start_desc(struct bcm2835_chan *c) > > static irqreturn_t bcm2835_dma_callback(int irq, void *data) > { > - struct bcm2835_chan *c = data; > + struct dma_chan *chan = data; > + struct bcm2835_chan *c = to_bcm2835_dma_chan(chan); > struct bcm2835_desc *d; > unsigned long flags; > > @@ -566,7 +570,7 @@ static irqreturn_t bcm2835_dma_callback(int irq, void *data) > vchan_cyclic_callback(&d->vd); > } else if (!readl(c->chan_base + BCM2835_DMA_ADDR)) { > vchan_cookie_complete(&c->desc->vd); > - bcm2835_dma_start_desc(c); > + bcm2835_dma_start_desc(chan); > } > } > > @@ -594,7 +598,7 @@ static int bcm2835_dma_alloc_chan_resources(struct dma_chan *chan) > } > > return request_irq(c->irq_number, bcm2835_dma_callback, > - c->irq_flags, "DMA IRQ", c); > + c->irq_flags, "DMA IRQ", chan); > } > > static void bcm2835_dma_free_chan_resources(struct dma_chan *chan) > @@ -682,7 +686,7 @@ static void bcm2835_dma_issue_pending(struct dma_chan *chan) > > spin_lock_irqsave(&c->vc.lock, flags); > if (vchan_issue_pending(&c->vc) && !c->desc) > - bcm2835_dma_start_desc(c); > + bcm2835_dma_start_desc(chan); > > spin_unlock_irqrestore(&c->vc.lock, flags); > } > @@ -846,7 +850,7 @@ static int bcm2835_dma_terminate_all(struct dma_chan *chan) > if (c->desc) { > vchan_terminate_vdesc(&c->desc->vd); > c->desc = NULL; > - bcm2835_dma_abort(c); > + bcm2835_dma_abort(chan); > } > > vchan_get_all_descriptors(&c->vc, &head); > -- > 2.34.1 >