Skip to content

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

@kv2019i

Description

@kv2019i

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ZephyrIssues only observed with Zephyr integratedenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions