Skip to content

Commit

Permalink
platform: intel: ace: make CPU clock control calls optional
Browse files Browse the repository at this point in the history
Dynamic CPU clock control is not enabled in all ACE builds.
Make the kcps_*() calls conditional in the platform initialization
code. The default clock frequency at boot should be set by
platform code in Zephyr for each platform.

Link: #9541
Signed-off-by: Kai Vehmanen <[email protected]>
  • Loading branch information
kv2019i committed Nov 21, 2024
1 parent 998f2ec commit 69f3b97
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/platform/intel/ace/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,15 @@ static struct pm_notifier pm_state_notifier = {
/* Runs on the primary core only */
int platform_init(struct sof *sof)
{
int ret;
int ret = 0;

trace_point(TRACE_BOOT_PLATFORM_CLOCK);
platform_clock_init(sof);
kcps_budget_init();

#if CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL
kcps_budget_init();

ret = core_kcps_adjust(cpu_get_id(), PRIMARY_CORE_BASE_CPS_USAGE);
#else
ret = core_kcps_adjust(cpu_get_id(), CLK_MAX_CPU_HZ / 1000);
#endif
if (ret < 0)
return ret;
Expand Down

0 comments on commit 69f3b97

Please sign in to comment.