From patchwork Sun Jan 8 14:44:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6092 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 29D3C23F7F for ; Sun, 8 Jan 2012 14:44:45 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 13687A18003 for ; Sun, 8 Jan 2012 14:44:45 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id 17so1410777bke.11 for ; Sun, 08 Jan 2012 06:44:45 -0800 (PST) Received: by 10.204.152.20 with SMTP id e20mr5485376bkw.117.1326033884918; Sun, 08 Jan 2012 06:44:44 -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 ac16cs24273bkc; Sun, 8 Jan 2012 06:44:44 -0800 (PST) Received: by 10.236.175.39 with SMTP id y27mr15957352yhl.86.1326033882847; Sun, 08 Jan 2012 06:44:42 -0800 (PST) Received: from VA3EHSOBE007.bigfish.com (va3ehsobe006.messaging.microsoft.com. [216.32.180.16]) by mx.google.com with ESMTPS id d50si62223618yhh.29.2012.01.08.06.44.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 08 Jan 2012 06:44:42 -0800 (PST) Received-SPF: neutral (google.com: 216.32.180.16 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=216.32.180.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.180.16 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail183-va3-R.bigfish.com (10.7.14.250) by VA3EHSOBE007.bigfish.com (10.7.40.11) with Microsoft SMTP Server id 14.1.225.23; Sun, 8 Jan 2012 14:44:42 +0000 Received: from mail183-va3 (localhost [127.0.0.1]) by mail183-va3-R.bigfish.com (Postfix) with ESMTP id D952B36046F; Sun, 8 Jan 2012 14:44:41 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail183-va3 (localhost.localdomain [127.0.0.1]) by mail183-va3 (MessageSwitch) id 1326033881218670_7442; Sun, 8 Jan 2012 14:44:41 +0000 (UTC) Received: from VA3EHSMHS028.bigfish.com (unknown [10.7.14.236]) by mail183-va3.bigfish.com (Postfix) with ESMTP id B2B95400064; Sun, 8 Jan 2012 14:44:40 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS028.bigfish.com (10.7.99.38) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sun, 8 Jan 2012 14:44:40 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.355.3; Sun, 8 Jan 2012 08:44:39 -0600 Received: from b20223-02.ap.freescale.net (b20223-02.ap.freescale.net [10.192.242.124]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id q08EiXZn022572; Sun, 8 Jan 2012 08:44:37 -0600 (CST) From: Richard Zhao To: , CC: , , , , , , Richard Zhao Subject: [PATCH v4 1/2] dma/imx-sdma: let sdma_run_channel call sdma_enable_channel Date: Sun, 8 Jan 2012 22:44:21 +0800 Message-ID: <1326033862-25351-2-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1326033862-25351-1-git-send-email-richard.zhao@linaro.org> References: <1326033862-25351-1-git-send-email-richard.zhao@linaro.org> MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com Let all enable channel code call sdma_enable_channel. Signed-off-by: Richard Zhao Acked-by: Shawn Guo --- 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 f59fd8f..c2bc4f1 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -394,6 +394,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 */ @@ -405,7 +410,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); @@ -811,11 +816,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;