From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964796AbbC0PPc (ORCPT ); Fri, 27 Mar 2015 11:15:32 -0400 Received: from bhuna.collabora.co.uk ([93.93.135.160]:39485 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964772AbbC0PP2 (ORCPT ); Fri, 27 Mar 2015 11:15:28 -0400 Message-ID: <5515740B.7090200@collabora.co.uk> Date: Fri, 27 Mar 2015 16:15:23 +0100 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Krzysztof Kozlowski CC: Kukjin Kim , Doug Anderson , Olof Johansson , Abhilash Kesavan , Kevin Hilman , Tyler Baker , Steve Capper , Amit Kucheria , 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 References: <1427466097-7287-1-git-send-email-javier.martinez@collabora.co.uk> <1427466097-7287-3-git-send-email-javier.martinez@collabora.co.uk> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Krzysztof, Thanks a lot for your feedback. On 03/27/2015 03:38 PM, Krzysztof Kozlowski wrote: > 2015-03-27 15:21 GMT+01:00 Javier Martinez Canillas > : >> Commit ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power >> Management support v12") added pm support for the pl330 dma driver but >> it makes the clock for the Exynos5420 MDMA0 DMA controller to be gated >> during suspend and this clock needs to remain enabled in order to make >> the system resume from a system suspend state. >> >> To make sure that the clock is enabled during suspend, enable it prior >> to entering a suspend state and disable it once the system has resumed. >> >> Thanks to Abhilash Kesavan for figuring out that this was the issue. >> >> Fixes: ae43b32 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12") >> Signed-off-by: Javier Martinez Canillas > > Hmmm... isn't a real problem elsewhere - like some clock hierarchy is > wrong or incomplete? This rather looks like workaround for the > problem. > That's a very good question, that's why I sent it as an RFC. I didn't find anything relevant in the manual but I could certainly be missing something. >> >> @@ -516,6 +528,9 @@ static void exynos5420_pm_resume(void) >> { >> unsigned long tmp; >> >> + if (!IS_ERR_OR_NULL(clk)) >> + clk_disable_unprepare(clk); >> + > > Missing clk_put() > Yes, Sylwester already pointed it out. Sorry for missing that. > Best regards, > Krzysztof > Best regards, Javier