Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp256082lqh; Thu, 28 Mar 2024 00:28:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQMPpZRHRO8WJLM3G/OSwnEAYWK1VACSWkl5g8d8XB2mNd+kD4TAg1Ue1juS4XROp6p9QKXcQzNoJ0WCdLKykDWtiIswu/hQvg6ac7Pg== X-Google-Smtp-Source: AGHT+IEFUW9ZZ5BZZ/sNGIwyKxPkDTbp6D42Q/RzELosD1lsCfTjCqhPPtUgLALVaYTS4lmC64BB X-Received: by 2002:a17:90b:905:b0:2a0:6649:7582 with SMTP id bo5-20020a17090b090500b002a066497582mr1806640pjb.46.1711610928231; Thu, 28 Mar 2024 00:28:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711610928; cv=pass; d=google.com; s=arc-20160816; b=lG41InBozYpsfrtdvg81y/Yzs6dmE6BfuZ4A/tO/hETKTL0WZp6bNzOmqzMlmuhyyo PFwM2eOHFiLLMTXM0gp6GW3HKoStlbXuOfkHA9I3nYuxntr4iI3CuHfmSVRKef4Dwl3f vALh1aIw2gpGmm0JgzybGAncshBYnAvsEJKYea1i8KUaDK5gt2xexDvzBw7V4xH4yXiM T953pmSAfaWIQr+eUHsvfM4guIblxYflHZppXdS8bcp/AxlVEQ2gnXSKxBjZ8kGj1oDG cAMbpFr6vGT/fFEULccjdwpBfrxFsFZULW1mq47hL6Ztnhd4bIG3lgIfwQCD09zlzqeH 6nuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yYWrKmNB8zr/6Mhfolp3FVVGvNYL/8h7tpKq0mPYREE=; fh=uTyTf7D+UL3U2WYXKyQxmYt8ws5VK/RfSirgIDHjzco=; b=sIuxexezwszteh3Ygv9sEzi9Fuzdw53E9D7P/mn71BECoUxE0RO0DF5krFdNp3uJ90 eXq9zyZxKDEly5ivpGdabjp88VAdwZwSqYu0GDWdVVYS4HcqROsSZt9X7b1BhGYw6Yh+ gECuaFjAAVceyxzuNxuqBUaTrV8Xt1RFCstt4XB4Ag2QmN3G2XJOUdeZD4MPk9/3hg0s Ky61kmcLUevMkFZpb2mwqPtAyYMcY4HQ2FC6FL4WZLT8j5sqNHlGBUOLVa634p1Rh0tm nkwo+YZWp6M9gs7SghxxmRVnctY2jTCdPjulO+3hVRop60FS2Yx2zMNqR9TJ/kIJ1AQ/ zApQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="J/6iqpYV"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-122503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fz7-20020a17090b024700b0029f7f6b45dcsi3051193pjb.121.2024.03.28.00.28.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 00:28:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="J/6iqpYV"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-122503-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 D67D2294CBF for ; Thu, 28 Mar 2024 07:28:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7199851C46; Thu, 28 Mar 2024 07:28:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="J/6iqpYV" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 968B72561F; Thu, 28 Mar 2024 07:28:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711610921; cv=none; b=QctZqf6+uvY2PhfYYA+cD/S4fs1RGOaK5Fkuj542YKc0dRM/RXVnGeWBDhTNuripLareD4pIrPe9Ui28G3f9d3cm1CftsY4veGt8FySFsOI5cEhUPK/kG6oOuuVPS8qn/05afEY5vtCalr8YVDKRAnk7ij6zelGYYgYwhAo/w2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711610921; c=relaxed/simple; bh=ijOEeCiS3qSRc5vkkBFknmGBS+NCZHRyFeKZjNVu8LY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ISaI8v82eQsdTWU3cXmB8i60TJGYjHk+PEPU9hlaEuLbh6Q9tuYyI7vXewA0dcnAPyKsryEFNuM2f50tj1wrzl7YMHC4J6HsTp+eXpHkhPeDvLlifgVYzCb+i3+m2xMhl3f0I72kq6Ve/80LzAG8qyKzQXL90Io8cxm897MWFjY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J/6iqpYV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97067C433C7; Thu, 28 Mar 2024 07:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711610921; bh=ijOEeCiS3qSRc5vkkBFknmGBS+NCZHRyFeKZjNVu8LY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J/6iqpYVddWxSoR5VY0JmEmW4RcV/6iab+8AbRwbjn4SjChctq6U3Alq9l+CjysUZ qZNTL9Izuu8wY2frtyAVw3wDuRHzpUE69hGn36EbvtqVJ4TYZkyrFhYNfjpP3tgn2+ cnzKqD5vtY1KFUKigjos8wS21Qt4lzA0SQ5WZV7/O9Wm7DOob8OAoK1+Oq9U8zzTeO hVPuwAF9OL9DbOJ75C3pu4BwkibFNTRcBW945xSeK7Wipm1xFc9a6k8VeV0Xu+Jffz CTaSO7cblVE8SXngaSMsRb7mU2T04eEC9FzDD2Aa54t/uf1VA2IlZ3SKyyGo7zakM1 CwqxWbkerrB9g== Date: Thu, 28 Mar 2024 12:58:36 +0530 From: Vinod Koul To: Nikita Shubin Cc: Alexander Sverdlin , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v9 09/38] dma: cirrus: Convert to DT for Cirrus EP93xx Message-ID: References: <20240326-ep93xx-v9-0-156e2ae5dfc8@maquefel.me> <20240326-ep93xx-v9-9-156e2ae5dfc8@maquefel.me> <821da3f70fcd326860a995514791b228e3f3f7b7.camel@maquefel.me> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <821da3f70fcd326860a995514791b228e3f3f7b7.camel@maquefel.me> On 28-03-24, 10:24, Nikita Shubin wrote: > Hello Vinod! > > Thank you for looking into this. > > On Thu, 2024-03-28 at 10:01 +0530, Vinod Koul wrote: > > On 26-03-24, 12:18, Nikita Shubin via B4 Relay wrote: > > > From: Nikita Shubin > > > > > > +enum ep93xx_dma_type { > > > +???????M2P_DMA, > > > > Is this missing P2M? > > > > > +???????M2M_DMA, > > > +}; > > > + > > These are internal types used only to distinguish M2P/P2M and M2M > capable controllers in "of_device_id ep93xx_dma_of_ids[]". > > So M2P_DMA is M2P/P2M, a can rename M2P_DMA to M2P_P2M_DMA to avoid > confusion. > > > > > ?struct ep93xx_dma_engine; > > > ?static int ep93xx_dma_slave_config_write(struct dma_chan *chan, > > > ???????????????????????????????????????? enum > > > dma_transfer_direction dir, > > > @@ -129,11 +136,17 @@ struct ep93xx_dma_desc { > > > ????????struct list_head????????????????node; > > > ?}; > > > ? > > > +struct ep93xx_dma_chan_cfg { > > > +???????u8??????????????????????????????port; > > > +???????enum dma_transfer_direction?????dir; > > > > Why is direction stored here, it should be derived from the prep_xxx > > call, that has direction as an argument > > > > > > M2P/P2M channels aren't unidirectional. > > Citing "EP9xx User Guide": > > "Ten fully independent, programmable DMA controller internal M2P/P2M > channels (5 Tx and 5 Rx)." > > We need to return correct channel based on Device Tree provided data, > because we need direction in device_alloc_chan_resources() for hardware > setup before prepping. Okay it sounds okay in that case... > > May be i am mistaking somewhere. -- ~Vinod