Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757922AbcLOJ4Y (ORCPT ); Thu, 15 Dec 2016 04:56:24 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59350 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757792AbcLOJ4S (ORCPT ); Thu, 15 Dec 2016 04:56:18 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 4B9EC615E1 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 0/5] Support for QCA BAM DMA command descriptor Date: Thu, 15 Dec 2016 15:25:50 +0530 Message-Id: <1481795755-15302-1-git-send-email-absahu@codeaurora.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1971 Lines: 43 These patches mainly adds the support for QCA BAM command descriptor and per SG flags which are required for implementing BAM DMA support for some QCA peripherals like QPIC NAND/LCD. The BAM command descriptors perform all register reads and writes while data descriptors do data transfer. The QPIC NAND forms the chain of command and data descriptors for full page read/write and submit it to BAM DMA. Following are the limitation of existing DMA mapping function which forces us to go for separate DMA custom mapping function and SG. 1. BAM descriptor has multiple flags which cannot be mapped with generic DMA engine flags. 2. For each page code word i.e 512 bytes, approx 10-15 register read/writes are required. The NAND driver combines all these into SGL and submit it to BAM. Each register read/writes require different flags and the current generic SG does not have field to set dma flags for each SG. We cannot add flag parameter in generic SG since it is being used by different subsystems across linux kernel. So these patches add custom mapping function, QCA specific SG which has dma flag for each SG and its DMA mapping functions. With these, peripheral driver can set per SG flag and submit it to custom DMA mapping function. Abhishek Sahu (5): dmaengine: qca: bam_dma: Add header file for bam driver dmaengine: Add support for custom data mapping dmaengine: qca: bam_dma: Add support for bam sgl dmaengine: qca: bam_dma: implement custom data mapping dmaengine: qca: bam_dma: implement command descriptor drivers/dma/qcom/bam_dma.c | 98 +++++++++++++++++++++-- include/linux/dma/qcom_bam_dma.h | 162 +++++++++++++++++++++++++++++++++++++++ include/linux/dmaengine.h | 5 ++ 3 files changed, 258 insertions(+), 7 deletions(-) create mode 100644 include/linux/dma/qcom_bam_dma.h -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project