[PATCH v8 7/7] clk: rockchip: implement proper GATE_LINK support
Chad LeClair
leclair at gmail.com
Wed Mar 20 19:50:48 PDT 2024
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.
BTW, In case it is of interest to you or Ilya, I have my "working" tree
available here:
https://github.com/sesca128/linux-rk3588/tree/v6.8-rk3588-test
My quick and dirty hack is at the tip of the branch. The rest is pretty
much your rk3588-test branch from a few days ago.
--
Chad LeClair
More information about the Linux-rockchip
mailing list