From patchwork Mon Jun 26 12:49:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Sahu X-Patchwork-Id: 9809657 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9126360329 for ; Mon, 26 Jun 2017 12:56:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9762826256 for ; Mon, 26 Jun 2017 12:56:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C15B281C3; Mon, 26 Jun 2017 12:56:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0212526256 for ; Mon, 26 Jun 2017 12:56:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751998AbdFZMtr (ORCPT ); Mon, 26 Jun 2017 08:49:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51388 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbdFZMto (ORCPT ); Mon, 26 Jun 2017 08:49:44 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BD95C6119C; Mon, 26 Jun 2017 12:49:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1498481383; bh=hLSH1SoHirmW5smon98Zkm21CFVtT+WIguUFR6TU9B0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nCDuGzcrAgF9zRjhVjitgkCDn2hiB4ohqN/yas5hkt7R+uYAG+1+mtTWUrsAhnym4 yjDXCDFthufEkAuzklEEr3FdiWQ3EVnPlNzJZO+RjvAkk9PrsjdI8kdjz34Y+OG1Ws AZYtgwy1cCdvgsHa4tD1SaXBAQH2WsORu03pYYHI= Received: from absahu-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: absahu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9B2B6611C8; Mon, 26 Jun 2017 12:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1498481383; bh=hLSH1SoHirmW5smon98Zkm21CFVtT+WIguUFR6TU9B0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nCDuGzcrAgF9zRjhVjitgkCDn2hiB4ohqN/yas5hkt7R+uYAG+1+mtTWUrsAhnym4 yjDXCDFthufEkAuzklEEr3FdiWQ3EVnPlNzJZO+RjvAkk9PrsjdI8kdjz34Y+OG1Ws AZYtgwy1cCdvgsHa4tD1SaXBAQH2WsORu03pYYHI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9B2B6611C8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=absahu@codeaurora.org From: Abhishek Sahu To: andy.gross@linaro.org, david.brown@linaro.org, vinod.koul@intel.com, dan.j.williams@intel.com Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Abhishek Sahu Subject: [PATCH v2 1/3] dmaengine: add DMA_PREP_CMD for non-Data descriptors. Date: Mon, 26 Jun 2017 18:19:27 +0530 Message-Id: <1498481369-29497-2-git-send-email-absahu@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498481369-29497-1-git-send-email-absahu@codeaurora.org> References: <1498481369-29497-1-git-send-email-absahu@codeaurora.org> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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. */ 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), }; /**