diff --git a/src/platform/lunarlake/include/platform/lib/clk.h b/src/platform/lunarlake/include/platform/lib/clk.h index fe8f140ff0a6..77e72d8c6ccd 100644 --- a/src/platform/lunarlake/include/platform/lib/clk.h +++ b/src/platform/lunarlake/include/platform/lib/clk.h @@ -14,21 +14,19 @@ #include -#define CLK_MAX_CPU_HZ 400000000 +#define CLK_MAX_CPU_HZ CONFIG_XTENSA_CCOUNT_HZ #define CPU_WOVCRO_FREQ_IDX 0 -#define CPU_LPRO_FREQ_IDX 1 - -#define CPU_HPRO_FREQ_IDX 2 +#define CPU_IPLL_FREQ_IDX 1 #define CPU_LOWEST_FREQ_IDX CPU_WOVCRO_FREQ_IDX -#define CPU_DEFAULT_IDX CPU_HPRO_FREQ_IDX +#define CPU_DEFAULT_IDX CPU_IPLL_FREQ_IDX #define SSP_DEFAULT_IDX 1 -#define NUM_CPU_FREQ 3 +#define NUM_CPU_FREQ 2 #define NUM_SSP_FREQ 3 diff --git a/src/platform/lunarlake/lib/clk.c b/src/platform/lunarlake/lib/clk.c index ed2936b5efc4..7ad664c94118 100644 --- a/src/platform/lunarlake/lib/clk.c +++ b/src/platform/lunarlake/lib/clk.c @@ -9,9 +9,8 @@ #include static const struct freq_table platform_cpu_freq[] = { - { 38400000, 38400 }, - { 120000000, 120000 }, - { CLK_MAX_CPU_HZ, 400000 }, + { CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / 1000 }, + { CLK_MAX_CPU_HZ, CLK_MAX_CPU_HZ / 1000 }, }; STATIC_ASSERT(ARRAY_SIZE(platform_cpu_freq) == NUM_CPU_FREQ, invalid_number_of_cpu_frequencies); diff --git a/src/platform/meteorlake/include/platform/lib/clk.h b/src/platform/meteorlake/include/platform/lib/clk.h index 2eb1732aad55..fec0a582ab7e 100644 --- a/src/platform/meteorlake/include/platform/lib/clk.h +++ b/src/platform/meteorlake/include/platform/lib/clk.h @@ -14,21 +14,19 @@ #include -#define CLK_MAX_CPU_HZ 400000000 +#define CLK_MAX_CPU_HZ CONFIG_XTENSA_CCOUNT_HZ #define CPU_WOVCRO_FREQ_IDX 0 -#define CPU_LPRO_FREQ_IDX 1 - -#define CPU_HPRO_FREQ_IDX 2 +#define CPU_IPLL_FREQ_IDX 1 #define CPU_LOWEST_FREQ_IDX CPU_WOVCRO_FREQ_IDX -#define CPU_DEFAULT_IDX CPU_HPRO_FREQ_IDX +#define CPU_DEFAULT_IDX CPU_IPLL_FREQ_IDX #define SSP_DEFAULT_IDX 1 -#define NUM_CPU_FREQ 3 +#define NUM_CPU_FREQ 2 #define NUM_SSP_FREQ 3 diff --git a/src/platform/meteorlake/lib/clk.c b/src/platform/meteorlake/lib/clk.c index 227bc9fd9366..20221b89d790 100644 --- a/src/platform/meteorlake/lib/clk.c +++ b/src/platform/meteorlake/lib/clk.c @@ -9,9 +9,8 @@ #include static const struct freq_table platform_cpu_freq[] = { - { 38400000, 38400 }, - { 120000000, 120000 }, - { CLK_MAX_CPU_HZ, 400000 }, + { CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC, CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / 1000 }, + { CLK_MAX_CPU_HZ, CLK_MAX_CPU_HZ / 1000 }, }; STATIC_ASSERT(ARRAY_SIZE(platform_cpu_freq) == NUM_CPU_FREQ, invalid_number_of_cpu_frequencies);