From mboxrd@z Thu Jan 1 00:00:00 1970 From: Abhishek Sahu Subject: Re: [PATCH v2 1/3] dmaengine: add DMA_PREP_CMD for non-Data descriptors. Date: Mon, 31 Jul 2017 18:31:55 +0530 Message-ID: <9a3b9f7eb978090111c423d748b8ad75@codeaurora.org> References: <1498481369-29497-1-git-send-email-absahu@codeaurora.org> <1498481369-29497-2-git-send-email-absahu@codeaurora.org> <20170719100753.GF3053@localhost> <2060be251cdc87fba73a891425caa7a3@codeaurora.org> <4a4a5956cff8c5f49f4f44dfbfd0589e@codeaurora.org> <20170731123405.GK3053@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:46328 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbdGaNB4 (ORCPT ); Mon, 31 Jul 2017 09:01:56 -0400 In-Reply-To: <20170731123405.GK3053@localhost> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Vinod Koul Cc: andy.gross@linaro.org, david.brown@linaro.org, dan.j.williams@intel.com, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org On 2017-07-31 18:04, Vinod Koul wrote: > On Fri, Jul 28, 2017 at 09:38:56PM +0530, Abhishek Sahu wrote: >> On 2017-07-19 17:48, Abhishek Sahu wrote: >> >On 2017-07-19 15:37, Vinod Koul wrote: >> >>On Mon, Jun 26, 2017 at 06:19:27PM +0530, Abhishek Sahu wrote: >> >>>Some of the DMA controllers are capable of issuing the commands >> >>>to peripheral by the DMA. These commands can be list of register >> >>>reads/writes and its different from normal data reads/writes. >> >>>This patch adds new flag DMA_PREP_CMD in DMA API which tells >> >>>the driver that the data passed to DMA API is in command format >> >>>and DMA driver will form descriptor in the required format. >> >>> >> >>>This flag can be used by any DMA controller driver which requires >> >>>special handling for non-Data descriptors. >> >> >> >>Please add Documentation for this new flag in >> >>Documentation/dmaengine/provider.txt >> >> >> > >> > Sure. I will add update the documentation in v3. >> > >> >>> >> >>>Signed-off-by: Abhishek Sahu >> >>>--- >> >>> include/linux/dmaengine.h | 3 +++ >> >>> 1 file changed, 3 insertions(+) >> >>> >> >>>diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h >> >>>index 5336808..bbc297e 100644 >> >>>--- a/include/linux/dmaengine.h >> >>>+++ b/include/linux/dmaengine.h >> >>>@@ -186,6 +186,8 @@ struct dma_interleaved_template { >> >>> * on the result of this operation >> >>> * @DMA_CTRL_REUSE: client can reuse the descriptor and submit again >> >>>till >> >>> * cleared or freed >> >>>+ * @DMA_PREP_CMD: tell the driver that the data passed to DMA API is >> >>>in command >> >>>+ * format and it will be used for configuring the peripheral >> >>>registers. >> >> >> >>Can you explain what is command format..? >> >> >> > >> > The command format is not generic and its format will be dependent >> > upon DMA engine. The client drivers will give data in its own >> > command formats and this flag will be passed to DMA API’s to do >> > the parsing according to its own command format. >> > >> > Currently this flag description and name is inclined towards >> > Qualcomm BAM DMA command flag. We want to make this flag as >> > generic one so require your suggestion regarding this. >> > Will renaming this flag as DMA_PREP_NON_DATA or >> > DMA_PREP_CUSTOM make it more generic? >> > >> >> can we use same flag name DMA_PREP_CMD or should we >> go for some other name? > > Are you asking for using DMA_PREP_CMD, for that I think should be ok > > If you asking about adding a new flag with DMA_PREP_CMD, then it would > no > Thanks Vinod. We just want to add only one flag with name DMA_PREP_CMD and no other new flag. I will update the description for DMA_PREP_CMD in Documentation/dmaengine/provider.txt >> >> >>> */ >> >>> enum dma_ctrl_flags { >> >>> DMA_PREP_INTERRUPT = (1 << 0), >> >>>@@ -195,6 +197,7 @@ enum dma_ctrl_flags { >> >>> DMA_PREP_CONTINUE = (1 << 4), >> >>> DMA_PREP_FENCE = (1 << 5), >> >>> DMA_CTRL_REUSE = (1 << 6), >> >>>+ DMA_PREP_CMD = (1 << 7), >> >>> }; >> >>> >>