All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>,
	Doug Anderson <dianders@chromium.org>,
	Olof Johansson <olof@lixom.net>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Abhilash Kesavan <kesavan.abhilash@gmail.com>,
	Kevin Hilman <khilman@linaro.org>,
	Tyler Baker <tyler.baker@linaro.org>,
	Steve Capper <steve.capper@linaro.org>,
	Amit Kucheria <amit.kucheria@linaro.org>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] ARM: EXYNOS: Make sure that the Exynos5420 MDMA0 clock is enabled during suspend
Date: Fri, 27 Mar 2015 16:11:49 +0100	[thread overview]
Message-ID: <55157335.9070808@collabora.co.uk> (raw)
In-Reply-To: <55156AD0.5070107@samsung.com>

Hello Sylwester,

Thanks a lot for your feedback.

On 03/27/2015 03:36 PM, Sylwester Nawrocki wrote:
>>   * GIC wake-up support
>> @@ -374,6 +376,16 @@ static void exynos5420_pm_prepare(void)
>>  {
>>  	unsigned int tmp;
>>  
>> +	/*
>> +	 * Exynos5420 requires the MDMA0 controller clock to be
>> +	 * ungated on suspend in order to be resumed correctly.
>> +	 */
>> +	clk = clk_get(NULL, "mdma0");
>> +	if (IS_ERR(clk))
>> +		pr_warn("Failed to get mdma0 clk (%ld)\n", PTR_ERR(clk));
> 
> I suppose you want this clk_get() call in exynos_pm_init(), now there

Well I wanted to do it in an exynos5420 specific function to avoid
having an of_machine_is_compatible("samsung,exynos5420") but I can
move there if that is preferred.

> is clk_put() missing and this will cause a memory leak.
>

duh, I wonder how I missed that. Thanks for pointing it out.

>> +	else
>> +		clk_prepare_enable(clk);
>> +
>>  	/* Set wake-up mask registers */
>>  	exynos_pm_set_wakeup_mask();
>>  
>> @@ -516,6 +528,9 @@ static void exynos5420_pm_resume(void)
>>  {
>>  	unsigned long tmp;
>>  
>> +	if (!IS_ERR_OR_NULL(clk))
> 
> This should be just IS_ERR().
>

Ok.

>> +		clk_disable_unprepare(clk);
>> +
>>  	/* Restore the CPU0 low power state register */
>>  	tmp = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG);
>>  	pmu_raw_writel(tmp | S5P_CORE_LOCAL_PWR_EN,
> 
> --
> Regards,
> Sylwester
> 

Best regards,
Javier

  reply	other threads:[~2015-03-27 15:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 14:21 [RFC PATCH 0/2] ARM: EXYNOS: Fix Suspend-to-RAM on Exynos5420 Javier Martinez Canillas
2015-03-27 14:21 ` [RFC PATCH 1/2] clk: exynos5420: Add alias for MDMA0 controller clock Javier Martinez Canillas
2015-03-27 14:21 ` [RFC PATCH 2/2] ARM: EXYNOS: Make sure that the Exynos5420 MDMA0 clock is enabled during suspend Javier Martinez Canillas
2015-03-27 14:36   ` Sylwester Nawrocki
2015-03-27 15:11     ` Javier Martinez Canillas [this message]
2015-03-27 14:38   ` Krzysztof Kozlowski
2015-03-27 15:15     ` Javier Martinez Canillas
2015-03-30  2:04   ` Chanwoo Choi
2015-03-30 15:56     ` Javier Martinez Canillas

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=55157335.9070808@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=amit.kucheria@linaro.org \
    --cc=dianders@chromium.org \
    --cc=k.kozlowski@samsung.com \
    --cc=kesavan.abhilash@gmail.com \
    --cc=kgene@kernel.org \
    --cc=khilman@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=s.nawrocki@samsung.com \
    --cc=steve.capper@linaro.org \
    --cc=tyler.baker@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 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.