From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Vinod Koul <vinod.koul@intel.com>
Cc: "Huang Shijie" <b32955@freescale.com>,
"Wolfram Sang" <w.sang@pengutronix.de>,
linux-kernel@vger.kernel.org,
"Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [PATCH 2/4] dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
Date: Thu, 8 Dec 2011 09:15:42 +0100 [thread overview]
Message-ID: <a1132406901d44f33dcbd3553af8ea32d5a9044e.1323176362.git.LW@KARO-electronics.de> (raw)
In-Reply-To: <95cce41674a2ad03ecd55190ec184eab0069fe3a.1323176362.git.LW@KARO-electronics.de>
In-Reply-To: <cover.1323176362.git.LW@KARO-electronics.de>
There is no need to have the clock enabled all the time the driver is
loaded.
It will be enabled anyway in mxs_dma_alloc_chan_resources() when a
channel is actually going to be used.
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
drivers/dma/mxs-dma.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index f228f55..c7574e8 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -580,7 +580,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
ret = clk_enable(mxs_dma->clk);
if (ret)
- goto err_out;
+ return ret;
ret = mxs_reset_block(mxs_dma->base);
if (ret)
@@ -604,11 +604,8 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
writel(MXS_DMA_CHANNELS_MASK << MXS_DMA_CHANNELS,
mxs_dma->base + HW_APBHX_CTRL1 + MXS_SET_ADDR);
- clk_disable(mxs_dma->clk);
-
- return 0;
-
err_out:
+ clk_disable(mxs_dma->clk);
return ret;
}
--
1.5.6.5
next prev parent reply other threads:[~2011-12-08 8:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 8:15 [PATCH 0/4] dma: mxs-dma: several bugfixes for the MXS DMA driver Lothar Waßmann
2011-12-08 8:15 ` [PATCH 1/4] dma: mxs-dma: fix a typo in comment Lothar Waßmann
2011-12-08 8:15 ` Lothar Waßmann [this message]
2011-12-08 8:15 ` [PATCH 3/4] dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe Lothar Waßmann
2011-12-08 8:15 ` [PATCH 4/4] dma: mxs-dma: Don't use CLKGATE bits in CTRL0 to disable DMA channels Lothar Waßmann
2011-12-08 8:29 ` Huang Shijie
2011-12-08 10:52 ` Huang Shijie
2011-12-08 8:22 ` [PATCH 3/4] dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe Huang Shijie
2011-12-23 15:21 ` [PATCH 0/4] dma: mxs-dma: several bugfixes for the MXS DMA driver Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1132406901d44f33dcbd3553af8ea32d5a9044e.1323176362.git.LW@KARO-electronics.de \
--to=lw@karo-electronics.de \
--cc=b32955@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
--cc=w.sang@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®