mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Tushar Behera <tushar.behera@linaro.org>
Cc: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	kgene.kim@samsung.com, linaro-dev@lists.linaro.org,
	patches@linaro.org
Subject: Re: [PATCH 1/2] DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove
Date: Thu, 08 Dec 2011 13:05:02 +0530	[thread overview]
Message-ID: <1323329702.1641.26.camel@vkoul-udesk3> (raw)
In-Reply-To: <1323168355-2764-2-git-send-email-tushar.behera@linaro.org>

On Tue, 2011-12-06 at 16:15 +0530, Tushar Behera wrote:
> amba_probe() now calls pm_runtime_get_noresume() and pm_runtime_enable()
> for the devices before the device probe is called. Hence we don't need
> to call pm_runtime_get_xxx and pm_runtime_enable() in device probe again.
> In the same way, since amba_remove() calls the respective pm_runtime
> functions, those functions need not be called from device remove.
> 
> This patch fixes following run time error with pl330 driver.
> 
> dma-pl330 dma-pl330.0: Unbalanced pm_runtime_enable!
> dma-pl330 dma-pl330.0: failed to get runtime pm
> 
> Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Looks fine to me. Do you want these to go thru slave-dma or samsung
tree.
For latter:
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>

> ---
>  drivers/dma/pl330.c |   17 ++---------------
>  1 files changed, 2 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index a626e15..cd07121 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -834,17 +834,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
>  
>  	amba_set_drvdata(adev, pdmac);
>  
> -#ifdef CONFIG_PM_RUNTIME
> -	/* to use the runtime PM helper functions */
> -	pm_runtime_enable(&adev->dev);
> -
> -	/* enable the power domain */
> -	if (pm_runtime_get_sync(&adev->dev)) {
> -		dev_err(&adev->dev, "failed to get runtime pm\n");
> -		ret = -ENODEV;
> -		goto probe_err1;
> -	}
> -#else
> +#ifndef CONFIG_PM_RUNTIME
>  	/* enable dma clk */
>  	clk_enable(pdmac->clk);
>  #endif
> @@ -977,10 +967,7 @@ static int __devexit pl330_remove(struct amba_device *adev)
>  	res = &adev->res;
>  	release_mem_region(res->start, resource_size(res));
>  
> -#ifdef CONFIG_PM_RUNTIME
> -	pm_runtime_put(&adev->dev);
> -	pm_runtime_disable(&adev->dev);
> -#else
> +#ifndef CONFIG_PM_RUNTIME
>  	clk_disable(pdmac->clk);
>  #endif
>  


-- 
~Vinod


  reply	other threads:[~2011-12-08  7:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 10:45 [PATCH 0/2] Add PM_RUNTIME related fixes for PL330 Tushar Behera
2011-12-06 10:45 ` [PATCH 1/2] DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove Tushar Behera
2011-12-08  7:35   ` Vinod Koul [this message]
2011-12-08  7:43     ` Kukjin Kim
2011-12-08  8:16       ` Vinod Koul
2011-12-08 13:32         ` Jassi Brar
2011-12-09  3:19           ` Tushar Behera
2011-12-09  3:51             ` Jassi Brar
2011-12-06 10:45 ` [PATCH 2/2] ARM: EXYNOS: Add apb_pclk clkdev entry for mdma1 Tushar Behera
2011-12-08  7:43   ` Kukjin Kim

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=1323329702.1641.26.camel@vkoul-udesk3 \
    --to=vinod.koul@intel.com \
    --cc=kgene.kim@samsung.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=tushar.behera@linaro.org \
    /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®