From: Vinod Koul <vinod.koul@intel.com>
To: Han Xu <b45815@freescale.com>
Cc: shijie.huang@arm.com, dwmw2@infradead.org,
computersforpeace@gmail.com, boris.brezillon@free-electrons.com,
fabio.estevam@freescale.com, hofrat@osadl.org,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
dan.j.williams@intel.com, dmaengine@vger.kernel.org
Subject: Re: [PATCH v3 2/6] dmaengine: mxs: support i.MX7D and deep sleep mode
Date: Mon, 21 Sep 2015 22:32:38 +0530 [thread overview]
Message-ID: <20150921170238.GP2381@localhost> (raw)
In-Reply-To: <1440790365-28072-3-git-send-email-b45815@freescale.com>
On Fri, Aug 28, 2015 at 02:32:41PM -0500, Han Xu wrote:
> @@ -28,7 +28,6 @@
> #include <linux/of_device.h>
> #include <linux/of_dma.h>
> #include <linux/list.h>
> -
Pl dont change at random places
> + if (mxs_dma->dev_id == IMX7D_DMA) {
> + ret = clk_prepare_enable(mxs_dma->clk_io);
> + if (ret)
> + goto err_clk_unprepare;
> + }
> +
> mxs_dma_reset_chan(chan);
>
> dma_async_tx_descriptor_init(&mxs_chan->desc, chan);
> @@ -450,6 +464,8 @@ static int mxs_dma_alloc_chan_resources(struct dma_chan *chan)
>
> return 0;
>
> +err_clk_unprepare:
> + clk_disable_unprepare(mxs_dma->clk);
and this doesn't look right. You are calling this for failure on
clk_prepare_enable() so if clock prepare failed you are still going to
disable and unprepare??
> -static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
> +static int mxs_dma_init(struct mxs_dma_engine *mxs_dma)
this should be separate change explaining why
> +static int mxs_dma_pm_resume(struct device *dev)
> +{
> + struct mxs_dma_engine *mxs_dma = dev_get_drvdata(dev);
> + int ret;
> +
> + ret = mxs_dma_init(mxs_dma);
> + if (ret)
> + return ret;
> + return 0;
Aren't you supposed to prepare and unprepare clock in PM handlers too?
--
~Vinod
next prev parent reply other threads:[~2015-09-21 17:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 19:32 [PATCH v3 0/6] mtd: nand: gpmi: gpmi-nand DSM and bitflip support Han Xu
2015-08-28 19:32 ` [PATCH v3 1/6] mtd: nand: gpmi: add gpmi dsm supend/resume support Han Xu
2015-08-29 9:17 ` Nicholas Mc Guire
2015-09-01 8:11 ` Huang Shijie
2015-08-28 19:32 ` [PATCH v3 2/6] dmaengine: mxs: support i.MX7D and deep sleep mode Han Xu
2015-09-21 17:02 ` Vinod Koul [this message]
2015-10-20 15:52 ` Han Xu
2015-08-28 19:32 ` [PATCH v3 3/6] mtd: nand: gpmi: may use minimum required ecc for 744 oobsize NAND Han Xu
2015-08-28 19:32 ` [PATCH v3 4/6] mtd: nand: gpmi: add GPMI NAND support for i.MX7D Han Xu
2015-08-29 9:48 ` Nicholas Mc Guire
2015-08-28 19:32 ` [PATCH v3 5/6] mtd: nand: gpmi: correct bitflip for erased NAND page Han Xu
2015-08-28 19:32 ` [PATCH v3 6/6] mtd: nand: gpmi: support NAND on i.MX6UL Han Xu
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=20150921170238.GP2381@localhost \
--to=vinod.koul@intel.com \
--cc=b45815@freescale.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=fabio.estevam@freescale.com \
--cc=hofrat@osadl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=shijie.huang@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.