From patchwork Sun Jan 1 14:38:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6015 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4607723E10 for ; Sun, 1 Jan 2012 14:38:50 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3686CA184BB for ; Sun, 1 Jan 2012 14:38:50 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id c11so14040461eaa.11 for ; Sun, 01 Jan 2012 06:38:50 -0800 (PST) Received: by 10.205.120.148 with SMTP id fy20mr10014150bkc.125.1325428729960; Sun, 01 Jan 2012 06:38:49 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs295679bkc; Sun, 1 Jan 2012 06:38:49 -0800 (PST) Received: by 10.50.157.131 with SMTP id wm3mr53897418igb.13.1325428728716; Sun, 01 Jan 2012 06:38:48 -0800 (PST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id wp2si4803901igc.19.2012.01.01.06.38.47 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jan 2012 06:38:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: by mail-iy0-f178.google.com with SMTP id f6so32949795iag.37 for ; Sun, 01 Jan 2012 06:38:47 -0800 (PST) Received: by 10.50.135.41 with SMTP id pp9mr53930564igb.8.1325428727390; Sun, 01 Jan 2012 06:38:47 -0800 (PST) Received: from localhost.localdomain ([114.95.105.23]) by mx.google.com with ESMTPS id py9sm77186679igc.2.2012.01.01.06.38.39 (version=SSLv3 cipher=OTHER); Sun, 01 Jan 2012 06:38:46 -0800 (PST) From: Richard Zhao To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kernel@pengutronix.de, shawn.guo@linaro.org, vinod.koul@intel.com, dan.j.williams@intel.com, eric.miao@linaro.org, patches@linaro.org, Richard Zhao Subject: [PATCH v2 1/2] dma/imx-sdma: let sdma_run_channel call sdma_enable_channel Date: Sun, 1 Jan 2012 22:38:11 +0800 Message-Id: <1325428692-11473-2-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1325428692-11473-1-git-send-email-richard.zhao@linaro.org> References: <1325428692-11473-1-git-send-email-richard.zhao@linaro.org> Let all enable channel code call sdma_enable_channel. Signed-off-by: Richard Zhao --- drivers/dma/imx-sdma.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 2ebb2bc..f8e87b5 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -392,6 +392,11 @@ static int sdma_config_ownership(struct sdma_channel *sdmac, return 0; } +static void sdma_enable_channel(struct sdma_engine *sdma, int channel) +{ + __raw_writel(1 << channel, sdma->regs + SDMA_H_START); +} + /* * sdma_run_channel - run a channel and wait till it's done */ @@ -403,7 +408,7 @@ static int sdma_run_channel(struct sdma_channel *sdmac) init_completion(&sdmac->done); - __raw_writel(1 << channel, sdma->regs + SDMA_H_START); + sdma_enable_channel(sdma, channel); ret = wait_for_completion_timeout(&sdmac->done, HZ); @@ -807,11 +812,6 @@ out: return ret; } -static void sdma_enable_channel(struct sdma_engine *sdma, int channel) -{ - __raw_writel(1 << channel, sdma->regs + SDMA_H_START); -} - static dma_cookie_t sdma_assign_cookie(struct sdma_channel *sdmac) { dma_cookie_t cookie = sdmac->chan.cookie;