From patchwork Tue Jan 10 07:01:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhao X-Patchwork-Id: 6134 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 C443723F84 for ; Tue, 10 Jan 2012 07:02:16 +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 B2B9CA184E5 for ; Tue, 10 Jan 2012 07:02:16 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id zu5so295178bkb.11 for ; Mon, 09 Jan 2012 23:02:16 -0800 (PST) Received: by 10.205.26.67 with SMTP id rl3mr1509123bkb.45.1326178936517; Mon, 09 Jan 2012 23:02:16 -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 ac16cs74700bkc; Mon, 9 Jan 2012 23:02:16 -0800 (PST) Received: by 10.42.139.5 with SMTP id e5mr21127669icu.14.1326178934389; Mon, 09 Jan 2012 23:02:14 -0800 (PST) Received: from VA3EHSOBE002.bigfish.com (va3ehsobe002.messaging.microsoft.com. [216.32.180.12]) by mx.google.com with ESMTPS id a5si8360352icb.15.2012.01.09.23.02.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jan 2012 23:02:14 -0800 (PST) Received-SPF: neutral (google.com: 216.32.180.12 is neither permitted nor denied by best guess record for domain of richard.zhao@linaro.org) client-ip=216.32.180.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.180.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 mail3-va3-R.bigfish.com (10.7.14.245) by VA3EHSOBE002.bigfish.com (10.7.40.22) with Microsoft SMTP Server id 14.1.225.23; Tue, 10 Jan 2012 07:02:13 +0000 Received: from mail3-va3 (localhost [127.0.0.1]) by mail3-va3-R.bigfish.com (Postfix) with ESMTP id 611C2A008D; Tue, 10 Jan 2012 07:02:13 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dhc1ahc1bh87h2a8h668h839h) 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 mail3-va3 (localhost.localdomain [127.0.0.1]) by mail3-va3 (MessageSwitch) id 1326178931718576_11179; Tue, 10 Jan 2012 07:02:11 +0000 (UTC) Received: from VA3EHSMHS009.bigfish.com (unknown [10.7.14.254]) by mail3-va3.bigfish.com (Postfix) with ESMTP id AAD8424004C; Tue, 10 Jan 2012 07:02:11 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS009.bigfish.com (10.7.99.19) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 10 Jan 2012 07:01:56 +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; Tue, 10 Jan 2012 01:01:55 -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 q0A71qKi000113; Tue, 10 Jan 2012 01:01:53 -0600 (CST) From: Richard Zhao To: , CC: , , , , , , Richard Zhao Subject: [PATCH 1/6] dma/imx-sdma: let sdma_run_channel call sdma_enable_channel Date: Tue, 10 Jan 2012 15:01:45 +0800 Message-ID: <1326178910-14044-1-git-send-email-richard.zhao@linaro.org> X-Mailer: git-send-email 1.7.5.4 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;