Re: [PATCH 5/8] clk: qcom: lpasscc-sc7280: fix missing resume during probe

From: Johan Hovold
Date: Tue Jul 18 2023 - 11:39:53 EST


On Tue, Jul 18, 2023 at 07:58:41AM -0700, Bjorn Andersson wrote:
> On Tue, Jul 18, 2023 at 03:28:59PM +0200, Johan Hovold wrote:
> > Drivers that enable runtime PM must make sure that the controller is
> > runtime resumed before accessing its registers to prevent the power
> > domain from being disabled.
> >
>
> NB: the clock framework will runtime resume the controller surrounding
> operations, even so during probe. But this is not done for resets and
> gdscs - and in some clock drivers we poke registers directly from
> probe...
>
> The one time this really matters is where we associate the ahb clock
> with the runtime state, e.g. in qcs404 turingcc. On most other platforms
> we just mark these clocks always-on in gcc...

Right, I started looking at this with respect to the PM domain, but
my initial commit message only mentioned the need to make sure the
controller is resumed, which would have covered such interface clocks as
well.

And while ending up with a concurrent request to disable the PM domain
is not that likely, there is currently nothing preventing it so it still
needs to be fixed.

Johan