From patchwork Fri Jan 13 03:09:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6172 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 3BCFD23E14 for ; Fri, 13 Jan 2012 03:10:18 +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 25342A185E8 for ; Fri, 13 Jan 2012 03:10:18 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id zu5so2430515bkb.11 for ; Thu, 12 Jan 2012 19:10:18 -0800 (PST) Received: by 10.204.38.80 with SMTP id a16mr47009bke.99.1326424217932; Thu, 12 Jan 2012 19:10:17 -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 ac16cs19802bkc; Thu, 12 Jan 2012 19:10:17 -0800 (PST) Received: by 10.68.209.68 with SMTP id mk4mr1705900pbc.88.1326424215309; Thu, 12 Jan 2012 19:10:15 -0800 (PST) Received: from TX2EHSOBE004.bigfish.com (tx2ehsobe002.messaging.microsoft.com. [65.55.88.12]) by mx.google.com with ESMTPS id l8si10103422pbo.178.2012.01.12.19.10.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jan 2012 19:10:15 -0800 (PST) Received-SPF: neutral (google.com: 65.55.88.12 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=65.55.88.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 65.55.88.12 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) smtp.mail=richard.zhao@linaro.org Received: from mail87-tx2-R.bigfish.com (10.9.14.241) by TX2EHSOBE004.bigfish.com (10.9.40.24) with Microsoft SMTP Server id 14.1.225.23; Fri, 13 Jan 2012 03:10:13 +0000 Received: from mail87-tx2 (localhost [127.0.0.1]) by mail87-tx2-R.bigfish.com (Postfix) with ESMTP id 2BAF5540251; Fri, 13 Jan 2012 03:10:13 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dhc1ahc1bh87h2a8h668h839h65h) X-Spam-TCS-SCL: 4: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 mail87-tx2 (localhost.localdomain [127.0.0.1]) by mail87-tx2 (MessageSwitch) id 1326424212822574_18896; Fri, 13 Jan 2012 03:10:12 +0000 (UTC) Received: from TX2EHSMHS009.bigfish.com (unknown [10.9.14.237]) by mail87-tx2.bigfish.com (Postfix) with ESMTP id C17A940004F; Fri, 13 Jan 2012 03:10:12 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS009.bigfish.com (10.9.99.109) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 13 Jan 2012 03:10:11 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.355.3; Thu, 12 Jan 2012 21:10:10 -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 q0D3A36Q003861; Thu, 12 Jan 2012 21:10:08 -0600 (CST) From: Richard Zhao To: , CC: , , , , , , Richard Zhao Subject: [PATCH v2 1/6] dma/imx-sdma: let sdma_run_channel call sdma_enable_channel Date: Fri, 13 Jan 2012 11:09:56 +0800 Message-ID: <1326424201-20056-2-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1326424201-20056-1-git-send-email-richard.zhao@linaro.org> References: <1326424201-20056-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 Acked-by: Sascha Hauer --- 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;