From patchwork Sat Oct 11 15:46:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 398870 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 62DC9140170 for ; Sun, 12 Oct 2014 03:23:26 +1100 (EST) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 3F6B41A1C59 for ; Sun, 12 Oct 2014 03:23:26 +1100 (EST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lists.ozlabs.org (Postfix) with ESMTP id C27D31A1A11 for ; Sun, 12 Oct 2014 03:20:52 +1100 (EST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 11 Oct 2014 09:11:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,699,1406617200"; d="scan'208";a="603887835" Received: from vkoul-udesk3.iind.intel.com (HELO localhost.localdomain) ([10.223.96.11]) by fmsmga001.fm.intel.com with ESMTP; 11 Oct 2014 09:20:49 -0700 From: Vinod Koul To: dmaengine@vger.kernel.org Subject: [PATCH 2/6] dmaengine: freescale: add and export fsl_dma_external_start() Date: Sat, 11 Oct 2014 21:16:44 +0530 Message-Id: <1413042408-28491-3-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1413042408-28491-1-git-send-email-vinod.koul@intel.com> References: <1413042408-28491-1-git-send-email-vinod.koul@intel.com> Cc: Vinod Koul , Zhang Wei , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The freescale driver uses custom device control FSLDMA_EXTERNAL_START to put the controller in external start mode. Since we are planning to deprecate the device control, move this to exported API. Subsequent patches will remove the FSLDMA_EXTERNAL_START Signed-off-by: Vinod Koul --- drivers/dma/fsldma.c | 16 +++++++++++++++- include/linux/fsldma.h | 13 +++++++++++++ 2 files changed, 28 insertions(+), 1 deletions(-) create mode 100644 include/linux/fsldma.h diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index d5d6885..0cded86 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -36,7 +36,7 @@ #include #include #include - +#include #include "dmaengine.h" #include "fsldma.h" @@ -367,6 +367,20 @@ static void fsl_chan_toggle_ext_start(struct fsldma_chan *chan, int enable) chan->feature &= ~FSL_DMA_CHAN_START_EXT; } +int fsl_dma_external_start(struct dma_chan *dchan, int enable) +{ + struct fsldma_chan *chan; + + if (!dchan) + return -EINVAL; + + chan = to_fsl_chan(dchan); + + fsl_chan_toggle_ext_start(chan, enable); + return 0; +} +EXPORT_SYMBOL_GPL(fsl_dma_external_start); + static void append_ld_queue(struct fsldma_chan *chan, struct fsl_desc_sw *desc) { struct fsl_desc_sw *tail = to_fsl_desc(chan->ld_pending.prev); diff --git a/include/linux/fsldma.h b/include/linux/fsldma.h new file mode 100644 index 0000000..b213c02 --- /dev/null +++ b/include/linux/fsldma.h @@ -0,0 +1,13 @@ +/* + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef FSL_DMA_H +#define FSL_DMA_H +/* fsl dma API for enxternal start */ +int fsl_dma_external_start(struct dma_chan *dchan, int enable); + +#endif