Page MenuHomeFreeBSD

Add clk_list_freq() methods
Needs RevisionPublic

Authored by br on Nov 10 2022, 1:30 PM.
Tags
None
Referenced Files
F102807945: D37325.diff
Sun, Nov 17, 11:06 AM
Unknown Object (File)
Sep 29 2024, 6:26 PM
Unknown Object (File)
Sep 22 2024, 8:40 AM
Unknown Object (File)
Aug 19 2024, 10:56 PM
Unknown Object (File)
Jul 2 2024, 7:29 PM
Unknown Object (File)
Jun 17 2024, 2:43 AM
Unknown Object (File)
Jun 7 2024, 10:16 AM
Unknown Object (File)
Jun 3 2024, 11:11 AM
Subscribers

Details

Reviewers
manu
mmel
Group Reviewers
arm64
Summary

Add clk_list_freq() methods

This is needed for the interface between cpufreq and SCMI.

In the SCMI scenario available CPU frequencies are not described in the DTS file, we have to get them by querying SCMI.

Test Plan

Tested on ARM Morello platform

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br requested review of this revision.Nov 10 2022, 1:30 PM
br added a parent revision: D37316: SCMI support.
mmel requested changes to this revision.Nov 14 2022, 6:59 AM
mmel added a subscriber: mmel.

I don't think this feature is appropriate for a generic layer. Practically no physical clock can implement it. A PLL can typically produce trillions of discrete frequencies, which makes it practically impossible to enumerate.

IMHO you should add it to scmi_clknode_methods as a custom function (with an appropriate prefix ) Simply create an .m file for the method definition and add this new method to the method table.

This revision now requires changes to proceed.Nov 14 2022, 6:59 AM
In D37325#849561, @mmel wrote:

I don't think this feature is appropriate for a generic layer. Practically no physical clock can implement it. A PLL can typically produce trillions of discrete frequencies, which makes it practically impossible to enumerate.

IMHO you should add it to scmi_clknode_methods as a custom function (with an appropriate prefix ) Simply create an .m file for the method definition and add this new method to the method table.

Does it mean I don't need to alter extres/clk at all?
structs clk and clknode are defined in clk.c so I can't really use it outside generic layer.
So I will still need some wrappers similar to currently proposed clk_list_freq() or clknode_list_freq() that could dereference clk_t *