Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229580 > unrolled thread

Re: [PATCH v3 2/6] dmaengine: mxs: support i.MX7D and deep sleep mode

Started byVinod Koul <vinod.koul@intel.com>
First post2015-09-21 19:20 +0200
Last post2015-09-21 19:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 2/6] dmaengine: mxs: support i.MX7D and deep sleep mode Vinod Koul <vinod.koul@intel.com> - 2015-09-21 19:20 +0200

#1229580 — Re: [PATCH v3 2/6] dmaengine: mxs: support i.MX7D and deep sleep mode

FromVinod Koul <vinod.koul@intel.com>
Date2015-09-21 19:20 +0200
SubjectRe: [PATCH v3 2/6] dmaengine: mxs: support i.MX7D and deep sleep mode
Message-ID<qbcUV-4Fd-7@gated-at.bofh.it>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web