cavs: remove CONFIG_CAVS_LPRO_ONLY and clean up the code

CONFIG_CAVS_LPRO_ONLY is only for CoffeeLake and is not fit for current IPC4
main branch, so remove it to make code clean.

Signed-off-by: Rander Wang <rander.wang@intel.com>
This commit is contained in:
Rander Wang 2023-07-10 14:42:23 +08:00 committed by Liam Girdwood
parent ed6f48b94d
commit 2d02dd0ed5
4 changed files with 2 additions and 51 deletions

View File

@ -354,14 +354,6 @@ config CAVS_LPS
This option is required to support S0ix/D0ix mode This option is required to support S0ix/D0ix mode
on cAVS platforms. on cAVS platforms.
config CAVS_LPRO_ONLY
bool "Use low power ring oscillator always"
default n
depends on CAVS
help
Select if you want to use only the 120MHz LPRO as the DSP clock source.
This option is for debugging only at the moment, choose n if unclear.
config CAVS_USE_LPRO_IN_WAITI config CAVS_USE_LPRO_IN_WAITI
bool "Use low power ring oscillator in WFI" bool "Use low power ring oscillator in WFI"
default n default n

View File

@ -86,36 +86,8 @@ static inline void select_cpu_clock(int freq_idx, bool release_unused)
clock_unlock(key); clock_unlock(key);
} }
/* LPRO_ONLY mode */
#if CONFIG_CAVS_LPRO_ONLY
/*
* This is call from public API, there is no clock switch for core waiti, so
* value of value frequency index in 'active' state doesn't need to be saved in
* any additional variable and restored in future.
*/
static inline void set_cpu_current_freq_idx(int freq_idx, bool release_unused)
{
select_cpu_clock(freq_idx, true);
}
static void platform_clock_low_power_mode(int clock, bool enable)
{
/* do nothing for LPRO_ONLY mode */
}
void platform_clock_on_waiti(void)
{
/* do nothing for LPRO_ONLY mode */
}
void platform_clock_on_wakeup(void)
{
/* do nothing for LPRO_ONLY mode */
}
/* USE_LPRO_IN_WAITI mode */ /* USE_LPRO_IN_WAITI mode */
#elif CONFIG_CAVS_USE_LPRO_IN_WAITI #if CONFIG_CAVS_USE_LPRO_IN_WAITI
/* Store clock source that was active before going to waiti, /* Store clock source that was active before going to waiti,
* so it can be restored on wake up. * so it can be restored on wake up.

View File

@ -155,14 +155,9 @@ const struct ext_man_windows xsram_window
#endif #endif
#if CONFIG_TIGERLAKE #if CONFIG_TIGERLAKE
#if CONFIG_CAVS_LPRO_ONLY
#define CAVS_DEFAULT_RO SHIM_CLKCTL_RLROSCC
#define CAVS_DEFAULT_RO_FOR_MEM SHIM_CLKCTL_OCS_LP_RING
#else
#define CAVS_DEFAULT_RO SHIM_CLKCTL_RHROSCC #define CAVS_DEFAULT_RO SHIM_CLKCTL_RHROSCC
#define CAVS_DEFAULT_RO_FOR_MEM SHIM_CLKCTL_OCS_HP_RING #define CAVS_DEFAULT_RO_FOR_MEM SHIM_CLKCTL_OCS_HP_RING
#endif #endif
#endif
#if CONFIG_DW_GPIO #if CONFIG_DW_GPIO
@ -304,7 +299,7 @@ int platform_boot_complete(uint32_t boot_message)
{ {
struct ipc_cmd_hdr header; struct ipc_cmd_hdr header;
#if CONFIG_TIGERLAKE && !CONFIG_CAVS_LPRO_ONLY #if CONFIG_TIGERLAKE
/* TGL specific HW recommended flow */ /* TGL specific HW recommended flow */
pm_runtime_get(PM_RUNTIME_DSP, PWRD_BY_HPRO | (CONFIG_CORE_COUNT - 1)); pm_runtime_get(PM_RUNTIME_DSP, PWRD_BY_HPRO | (CONFIG_CORE_COUNT - 1));
#endif #endif
@ -393,11 +388,7 @@ int platform_init(struct sof *sof)
pm_runtime_get(PM_RUNTIME_DSP, PLATFORM_PRIMARY_CORE_ID); pm_runtime_get(PM_RUNTIME_DSP, PLATFORM_PRIMARY_CORE_ID);
#if CONFIG_DSP_RESIDENCY_COUNTERS #if CONFIG_DSP_RESIDENCY_COUNTERS
#if CONFIG_CAVS_LPRO_ONLY
init_dsp_r_state(r1_r_state);
#else
init_dsp_r_state(r0_r_state); init_dsp_r_state(r0_r_state);
#endif /* CONFIG_CAVS_LPRO_ONLY */
#endif /* CONFIG_DSP_RESIDENCY_COUNTERS */ #endif /* CONFIG_DSP_RESIDENCY_COUNTERS */
#endif /* CONFIG_TIGERLAKE */ #endif /* CONFIG_TIGERLAKE */

View File

@ -24,11 +24,7 @@
#define CPU_LOWEST_FREQ_IDX CPU_WOVCRO_FREQ_IDX #define CPU_LOWEST_FREQ_IDX CPU_WOVCRO_FREQ_IDX
#if CONFIG_CAVS_LPRO_ONLY
#define CPU_DEFAULT_IDX CPU_LPRO_FREQ_IDX
#else
#define CPU_DEFAULT_IDX CPU_HPRO_FREQ_IDX #define CPU_DEFAULT_IDX CPU_HPRO_FREQ_IDX
#endif
#define SSP_DEFAULT_IDX 1 #define SSP_DEFAULT_IDX 1