From patchwork Thu Jan 5 07:59: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: 6061 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 8795123E0E for ; Thu, 5 Jan 2012 07:59:41 +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 778EEA182A8 for ; Thu, 5 Jan 2012 07:59:41 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id 17so60869bke.11 for ; Wed, 04 Jan 2012 23:59:41 -0800 (PST) Received: by 10.205.120.11 with SMTP id fw11mr358174bkc.89.1325750381290; Wed, 04 Jan 2012 23:59:41 -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 ac16cs394839bkc; Wed, 4 Jan 2012 23:59:41 -0800 (PST) Received: by 10.227.198.68 with SMTP id en4mr819857wbb.26.1325750379719; Wed, 04 Jan 2012 23:59:39 -0800 (PST) Received: from TX2EHSOBE005.bigfish.com (tx2ehsobe003.messaging.microsoft.com. [65.55.88.13]) by mx.google.com with ESMTPS id eo7si18987578wbb.98.2012.01.04.23.59.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Jan 2012 23:59:39 -0800 (PST) Received-SPF: neutral (google.com: 65.55.88.13 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=65.55.88.13; Authentication-Results: mx.google.com; spf=neutral (google.com: 65.55.88.13 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail122-tx2-R.bigfish.com (10.9.14.238) by TX2EHSOBE005.bigfish.com (10.9.40.25) with Microsoft SMTP Server id 14.1.225.23; Thu, 5 Jan 2012 07:59:37 +0000 Received: from mail122-tx2 (localhost [127.0.0.1]) by mail122-tx2-R.bigfish.com (Postfix) with ESMTP id CF8C51600F2; Thu, 5 Jan 2012 07:59:37 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h) 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 mail122-tx2 (localhost.localdomain [127.0.0.1]) by mail122-tx2 (MessageSwitch) id 1325750377429182_17964; Thu, 5 Jan 2012 07:59:37 +0000 (UTC) Received: from TX2EHSMHS014.bigfish.com (unknown [10.9.14.253]) by mail122-tx2.bigfish.com (Postfix) with ESMTP id 60FBA480046; Thu, 5 Jan 2012 07:59:37 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS014.bigfish.com (10.9.99.114) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 5 Jan 2012 07:59:37 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.355.3; Thu, 5 Jan 2012 01:59:35 -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 q057xSfI014334; Thu, 5 Jan 2012 01:59:32 -0600 (CST) From: Richard Zhao To: , CC: , , , , , , Richard Zhao Subject: [PATCH v3 1/2] dma/imx-sdma: let sdma_run_channel call sdma_enable_channel Date: Thu, 5 Jan 2012 15:59:21 +0800 Message-ID: <1325750362-22598-2-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1325750362-22598-1-git-send-email-richard.zhao@linaro.org> References: <1325750362-22598-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;