From mboxrd@z Thu Jan 1 00:00:00 1970 From: Srinivas Kandagatla Subject: Re: [PATCH] dmaengine: qcom_bam_dma: Add descriptor flag APIs Date: Thu, 22 May 2014 16:56:18 +0100 Message-ID: <537E1E22.9070701@linaro.org> References: <1397772242-4048-1-git-send-email-agross@codeaurora.org> <20140502162841.GZ32284@intel.com> <20140502180827.GA9476@qualcomm.com> <20140515173206.GA16858@qualcomm.com> <20140522061049.GW21128@intel.com> <20140522150906.GA22327@qualcomm.com> <537E1749.1030505@linaro.org> <20140522153214.GB22327@qualcomm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com ([74.125.82.177]:62820 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751477AbaEVP4W (ORCPT ); Thu, 22 May 2014 11:56:22 -0400 Received: by mail-we0-f177.google.com with SMTP id x48so3650992wes.36 for ; Thu, 22 May 2014 08:56:21 -0700 (PDT) In-Reply-To: <20140522153214.GB22327@qualcomm.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Andy Gross Cc: Vinod Koul , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org On 22/05/14 16:32, Andy Gross wrote: > On Thu, May 22, 2014 at 04:27:05PM +0100, Srinivas Kandagatla wrote: > > > >>> >>> The EOT is not used for every transaction. It is part of a handshaking >>> protocol with the attached peripheral, much like the NWD (notify when done). As >>> near as I can tell today, no peripheral depends on the EOB, so we could drop it >>> for now until it is needed and cross this bridge when we need to. >> >> As EOT behaviour is totally dependent on the attached peripheral(or >> channel), Can't we make this specific to channel by passing >> additional flags in the DT dma channel descriptors? This will be >> better abstraction for drivers as well. > > Even for channels where you want to use EOT, you don't use it for every > transaction. So a global channel flag isn't going to work. This is the same > for NWD. It is a per descriptor choice. Thanks Andy for explaining, I got it now. > >> >> I know that EOT flag is part of descriptor but still some channels >> *must* have EOT to run there state-machine correctly. So making it >> optional for those channels might be wrong. >> >> Are there any use cases for particular *channel* where EOT >> requirement changes dynamically? > > I2C is one example. You place EOT on the last transaction that makes up a > write/read transaction. You may have multiple descriptors to send data, but the > last one has EOT. And for read transactions, you place NWD on the last read > transaction. > > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: srinivas.kandagatla@linaro.org (Srinivas Kandagatla) Date: Thu, 22 May 2014 16:56:18 +0100 Subject: [PATCH] dmaengine: qcom_bam_dma: Add descriptor flag APIs In-Reply-To: <20140522153214.GB22327@qualcomm.com> References: <1397772242-4048-1-git-send-email-agross@codeaurora.org> <20140502162841.GZ32284@intel.com> <20140502180827.GA9476@qualcomm.com> <20140515173206.GA16858@qualcomm.com> <20140522061049.GW21128@intel.com> <20140522150906.GA22327@qualcomm.com> <537E1749.1030505@linaro.org> <20140522153214.GB22327@qualcomm.com> Message-ID: <537E1E22.9070701@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 22/05/14 16:32, Andy Gross wrote: > On Thu, May 22, 2014 at 04:27:05PM +0100, Srinivas Kandagatla wrote: > > > >>> >>> The EOT is not used for every transaction. It is part of a handshaking >>> protocol with the attached peripheral, much like the NWD (notify when done). As >>> near as I can tell today, no peripheral depends on the EOB, so we could drop it >>> for now until it is needed and cross this bridge when we need to. >> >> As EOT behaviour is totally dependent on the attached peripheral(or >> channel), Can't we make this specific to channel by passing >> additional flags in the DT dma channel descriptors? This will be >> better abstraction for drivers as well. > > Even for channels where you want to use EOT, you don't use it for every > transaction. So a global channel flag isn't going to work. This is the same > for NWD. It is a per descriptor choice. Thanks Andy for explaining, I got it now. > >> >> I know that EOT flag is part of descriptor but still some channels >> *must* have EOT to run there state-machine correctly. So making it >> optional for those channels might be wrong. >> >> Are there any use cases for particular *channel* where EOT >> requirement changes dynamically? > > I2C is one example. You place EOT on the last transaction that makes up a > write/read transaction. You may have multiple descriptors to send data, but the > last one has EOT. And for read transactions, you place NWD on the last read > transaction. > > >