Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753260AbbDATCw (ORCPT ); Wed, 1 Apr 2015 15:02:52 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:33687 "EHLO mail-ie0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752935AbbDATCu convert rfc822-to-8bit (ORCPT ); Wed, 1 Apr 2015 15:02:50 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Krzysztof Kozlowski , "Kevin Hilman" From: Michael Turquette In-Reply-To: Cc: "Abhilash Kesavan" , "Krzysztof Kozlowski" , "linux-samsung-soc@vger.kernel.org" , "linux-kernel" , "Tyler Baker" , "Stephen Boyd" , "Tomasz Figa" , "Doug Anderson" , "Chanwoo Choi" , "Kukjin Kim" , "Sylwester Nawrocki" , "Olof Johansson" , "Javier Martinez Canillas" , "linux-arm-kernel" References: <1427730803-28635-1-git-send-email-javier.martinez@collabora.co.uk> <1427730803-28635-3-git-send-email-javier.martinez@collabora.co.uk> <551976F1.1000605@collabora.co.uk> <7hiodg98z7.fsf@deeprootsystems.com> <7h1tk47awc.fsf@deeprootsystems.com> Message-ID: <20150401190236.14369.26750@quantum> User-Agent: alot/0.3.5 Subject: Re: [RFC PATCH v3 2/2] clk: exynos5420: Make sure MDMA0 clock is enabled during suspend Date: Wed, 01 Apr 2015 12:02:36 -0700 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3324 Lines: 81 Quoting Krzysztof Kozlowski (2015-04-01 02:16:08) > 2015-04-01 6:03 GMT+02:00 Kevin Hilman : > > Abhilash Kesavan writes: > > > >> On Wed, Apr 1, 2015 at 2:32 AM, Kevin Hilman wrote: > >>> Javier Martinez Canillas writes: > >>> > >>> [...] > >>> > >>>> Unfortunately I don't fully understand why this clock needs to be > >>>> enabled. It would be good if someone at Samsung can explain in more > >>>> detail what the real problem really is. > >>> > >>> +1 > >>> > >>> Maybe Abhilash can shed some light here? > >>> > >>> We really should know *why* this is needed because having the fix in the > >>> clock driver just doesn't seem right. It seems like the DMA driver > >>> should be managing this clock. > >> > >> I think my last mail might not have reached you (was accidentally sent > >> as html). > > > > Yeah, I saw it a bit later in Javier's reply. Thanks for doing the > > research and reporting back. > > > >> We are gating the aclk266_g2d clock without checking the > >> CG_STATUS0 register bits as specified in the UM. It looks like we need > >> to keep several clocks alive or gate them only after checking the > >> CG_STATUSx register bits. > > > > I dont' know much about this clock hardware, but to me it sounds like a > > clock driver bug. The suspend fix Javier is proposing would fix it, but > > to me it sounds like the clock driver needs to actually start checking > > these CG_STATUSx bits before gating clocks. > > > > Otherwise, we might fix this current bug but a similar one will come and > > bite us another day. > > Actually it looks kind a similar to issue with adma/mau_epll clocks: > https://lkml.org/lkml/2014/12/5/291 > > In that case runtime PM for pl330 caused adma clock to be gated. This > lead to gating its parent clock - mau_epll. The clock hierarchy is > strange for maudio domain. Basically mau_epll is needed to access > maudio clocks however these clocks are not children of mau_epll. This sounds like an interface clock. It must be enabled for you touch registers across a bus/interconnect. For this type of clock is perfectly correct for the driver to enable it in addition to any functional clocks (e.g. maudio clocks). There are many instances where a driver must enable an interface clock (iclk) and a functional clock (fclk) and this isn't an issue of the driver knowing the clock topology, but instead knowing it's operational requirements. Just to make life more confusing, it might also be appropriate for the clock driver to manage turning on the interface clocks if this is required to touching the functional clocks. In general the register address space is used to determine which IP "owns" such behavior. Regards, Mike > > I think we should not enable the mdma0 but instead we should find the > proper parent which needs to be enabled. > > Anyway it is kind of annoying (or funny if one has sense of black > humour) that two issues are exposed by runtime PM for pl330 driver. > > Best regards, > Krzysztof -- 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/