Message ID | 20230718132902.21430-1-johan+linaro@kernel.org |
---|---|
Headers | show |
Series | clk: qcom: fix runtime PM bugs | expand |
On 18.07.2023 15:28, Johan Hovold wrote: > This series fixes a number of runtime PM related bugs found through > inspection. > > Johan I was thinking whether we should maybe incorporate RPM enablement into qcom common functions.. The only issue I see is that some clocks register pm clocks atop that, but I guess we could introduce some sort of a pm_clks names array to solve that? Konrad
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
On Tue, Jul 18, 2023 at 03:46:03PM +0200, Konrad Dybcio wrote: > On 18.07.2023 15:28, Johan Hovold wrote: > > This series fixes a number of runtime PM related bugs found through > > inspection. > I was thinking whether we should maybe incorporate RPM enablement > into qcom common functions.. The only issue I see is that some > clocks register pm clocks atop that, but I guess we could introduce > some sort of a pm_clks names array to solve that? Possibly, but you currently also have the hardcoded clock enables and some other variations. Johan