Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE][Zephyr] implement clk.h with native Zephyr interface and drop platform clk.h #9541

Open
kv2019i opened this issue Oct 3, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@kv2019i
Copy link
Collaborator

kv2019i commented Oct 3, 2024

Is your feature request related to a problem? Please describe.
Implement the SOF clk.h interface without depending on SOF platform interface and rather implement the functions using direct calls to Zephyr. This allows to move the platform specifics to Zephyr side and reduce the work needed to be done on SOF side to add new platforms.

Part of #5794

Additional context
Primary use in code base is for clock_get_freq() (e.g. in basefw.c). Most of the other uses are in XTOS drivers, which can be ignored for Zephyr builds. All in all, it's a good question whether clk.h interface is needed at all for application use and whether the clk.h could be just dropped (and only used for XTOS driver and platform code).

IOW, is there any need to query the CPU frequency from application code? After all, clock gating and scaling can be used and any logic dependent on exact frequency, is potentially sensitive to platform differences.

@kv2019i kv2019i added the enhancement New feature or request label Oct 3, 2024
@lgirdwood lgirdwood added this to the v2.12 milestone Oct 3, 2024
@kv2019i
Copy link
Collaborator Author

kv2019i commented Oct 4, 2024

Ok this is somewhat more complex as src/lib/cpu-clk-manager.c has non-trivial use of clk.h and this is used on many native Zephyr SOF platforms.

@lgirdwood
Copy link
Member

Ok this is somewhat more complex as src/lib/cpu-clk-manager.c has non-trivial use of clk.h and this is used on many native Zephyr SOF platforms.

Ok, pls do create a new generic application header for cpu-clk manager and we can transition to that and remove the old headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants