[PATCH v8 7/7] clk: rockchip: implement proper GATE_LINK support

Sebastian Reichel sebastian.reichel at collabora.com
Thu Mar 21 11:31:37 PDT 2024


Hi Chad and Ilya,

On Wed, Mar 20, 2024 at 10:50:48PM -0400, Chad LeClair wrote:
> Sebastian,
> 
> On 3/20/24 12:36, Sebastian Reichel wrote:
> 
> > I also worked on a cleaner solution for the issue you described and
> > integrated it in the patch adding proper gate clock support. So
> > please also test with HCLK_NVM not being marked as CRITICAL.
> > 
> > [0] https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/-/commits/rk3588-test
> > 
> > If everything is fine I will prepare a v9.
> > 
> >> Hope this additional data point helps!
> > 
> > Thanks for the detailed analysis.
> > 
> > Greetings,
> > 
> > -- Sebastian
> 
> 
> No luck unfortunately.  I still see the SFC dma timeouts.  It looks like
> aclk_nvm_root is still getting disabled.  It now has both an enable count of 0
> and a prepare count of 0.
>
> Unlike your previous version, I _do_ see the driver bound to the device and
> the rpm_resume() call finds its way to pm_clk_resume().  So it looks like
> you resolved the original issue I was seeing.
> 
> However, when I reach __pm_clk_enable() it looks like the clock entry (ce)
> is not in a good state:
>   (gdb) print *ce
>   $3 = {node = {next = 0xffff0001f0ce1930, prev = 0xffff0001f0ce1930}, con_id =
>   0xffff0001f0a214f0 "aclk_nvm_root", clk = 0xfffffffffffffffe, status =
>   PCE_STATUS_ERROR, enabled_when_prepared = false}
> 
> The immediate problem at hand is that ce->status is PCE_STATUS_ERROR so the 
> switch statement will take the default case and return without doing anything. 
> Also the ce->clk pointer looks like some sort of error pointer value so I'm
> wondering if something went wrong in the setup you were doing in 
> clk_gate_link_probe().
> 
> Note: I ran to that same __pm_clk_enable() breakpoint for a number of of 
> GATE_LINK clocks.  They all looked to be in that same bad state.  I put the 
> "aclk_nvm_root" one in the message here since that is the one that is most 
> relevant to the discussion, but they all look to be broken in the same way.
> 
> Hopefully this gives you a hint as to what is going on.

Ah, that was actually not setting up the clock links at all. Sorry
about that. I reworked everything again and moved all the GATE_LINK
code into the separate driver now. Please give it another try.

Greetings,

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20240321/372e7cbd/attachment.sig>


More information about the Linux-rockchip mailing list