clk: do not release clock only for LPRO->HPRO transition

This will allow to switch to HPRO much faster when needed in s0

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
This commit is contained in:
Adrian Bonislawski 2021-01-19 09:11:36 +01:00 committed by Michal Wasko
parent f59bb62e31
commit 592e79403e
1 changed files with 6 additions and 1 deletions

View File

@ -168,7 +168,12 @@ static void platform_clock_low_power_mode(int clock, bool enable)
int freq_idx = *cache_to_uncache(&active_freq_idx);
if (enable && current_freq_idx > CPU_LPRO_FREQ_IDX)
select_cpu_clock(CPU_LPRO_FREQ_IDX, true);
/* LPRO requests are fast, but requests for other ROs
* can take a lot of time. That's why it's better to
* not release active clock just for waiti,
* so they can be switched without delay on wake up.
*/
select_cpu_clock(CPU_LPRO_FREQ_IDX, false);
else if (!enable && current_freq_idx != freq_idx)
select_cpu_clock(freq_idx, true);
}