Page MenuHomeFreeBSD

Add clk_list_freq() methods
Needs RevisionPublic

Authored by br on Nov 10 2022, 1:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 17 2024, 10:14 AM
Unknown Object (File)
Jan 30 2024, 6:58 AM
Unknown Object (File)
Dec 20 2023, 8:27 AM
Unknown Object (File)
Nov 4 2023, 11:53 PM
Unknown Object (File)
Aug 27 2023, 4:29 PM
Unknown Object (File)
Aug 22 2023, 9:15 PM
Unknown Object (File)
Jul 12 2023, 7:44 AM
Unknown Object (File)
Jun 20 2023, 5:10 PM
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 *