From patchwork Thu Dec 15 09:55:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Sahu X-Patchwork-Id: 9475797 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 A9C8D607EE for ; Thu, 15 Dec 2016 09:58:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97EEC2870F for ; Thu, 15 Dec 2016 09:58:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B54B28740; Thu, 15 Dec 2016 09:58:55 +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=unavailable 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 2A4A02870F for ; Thu, 15 Dec 2016 09:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932441AbcLOJ6e (ORCPT ); Thu, 15 Dec 2016 04:58:34 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59438 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757872AbcLOJ4X (ORCPT ); Thu, 15 Dec 2016 04:56:23 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B2F2761620; Thu, 15 Dec 2016 09:56:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1481795782; bh=qQG9fjGOlQxSpI0RX7WegMnqKyGc31F1y9MMwhD/av8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b3MJ3ic0mS2PDF2BrBtwQNJxiIhzk4tH5DWIRHTi+JijgLrfPc48Pe4IOa+Qzzj0l o6khNTgvIYpkD1rFvjySPEhX3zphYhlugdKusbSRYZehQk2kFP93iaHjvgLu+5x2GB ZrdFNNLpx/Cc4Up3d9r8x+18LiftUQwn1slCMChA= Received: from chen-lnxbld15.qualcomm.com (unknown [202.46.23.62]) (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 00BC9615F3; Thu, 15 Dec 2016 09:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1481795782; bh=qQG9fjGOlQxSpI0RX7WegMnqKyGc31F1y9MMwhD/av8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b3MJ3ic0mS2PDF2BrBtwQNJxiIhzk4tH5DWIRHTi+JijgLrfPc48Pe4IOa+Qzzj0l o6khNTgvIYpkD1rFvjySPEhX3zphYhlugdKusbSRYZehQk2kFP93iaHjvgLu+5x2GB ZrdFNNLpx/Cc4Up3d9r8x+18LiftUQwn1slCMChA= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 00BC9615F3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=absahu@codeaurora.org From: Abhishek Sahu To: vinod.koul@intel.com, dan.j.williams@intel.com, andy.gross@linaro.org Cc: stanimir.varbanov@linaro.org, mcgrof@suse.com, okaya@codeaurora.org, pramod.gurav@linaro.org, arnd@arndb.de, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-msm@vger.kernel.org, Abhishek Sahu Subject: [PATCH 1/5] dmaengine: qca: bam_dma: Add header file for bam driver Date: Thu, 15 Dec 2016 15:25:51 +0530 Message-Id: <1481795755-15302-2-git-send-email-absahu@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1481795755-15302-1-git-send-email-absahu@codeaurora.org> References: <1481795755-15302-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 The QCA BAM DMA descriptor has other flags which cannot be mapped with generic DMA engine flags. This patch creates a new header file for BAM driver and moves the BAM flags to this file. Some other BAM specific mapping functions will be added in this file which can be used by different QCA peripheral drivers. Signed-off-by: Abhishek Sahu --- drivers/dma/qcom/bam_dma.c | 6 +----- include/linux/dma/qcom_bam_dma.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 include/linux/dma/qcom_bam_dma.h diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 03c4eb3..7078a4d 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -49,6 +49,7 @@ #include #include #include +#include #include "../dmaengine.h" #include "../virt-dma.h" @@ -61,11 +62,6 @@ struct bam_desc_hw { #define BAM_DMA_AUTOSUSPEND_DELAY 100 -#define DESC_FLAG_INT BIT(15) -#define DESC_FLAG_EOT BIT(14) -#define DESC_FLAG_EOB BIT(13) -#define DESC_FLAG_NWD BIT(12) - struct bam_async_desc { struct virt_dma_desc vd; diff --git a/include/linux/dma/qcom_bam_dma.h b/include/linux/dma/qcom_bam_dma.h new file mode 100644 index 0000000..c3b68c2 --- /dev/null +++ b/include/linux/dma/qcom_bam_dma.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _QCOM_BAM_DMA_H +#define _QCOM_BAM_DMA_H + +#define DESC_FLAG_INT BIT(15) +#define DESC_FLAG_EOT BIT(14) +#define DESC_FLAG_EOB BIT(13) +#define DESC_FLAG_NWD BIT(12) + +#endif