]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: mediatek: Link CCI device to CPU
authorRex-BC Chen <rex-bc.chen@mediatek.com>
Thu, 5 May 2022 11:52:22 +0000 (19:52 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 12 May 2022 05:09:31 +0000 (10:39 +0530)
commitaa7748678a2daf7b36b6d6d035221851f4016994
tree0f2145def718101e67c631849b49ed3902a76de7
parentf8c3d69e0c1fabfc0a970e53ccd0f5f68cd7840c
cpufreq: mediatek: Link CCI device to CPU

In some MediaTek SoCs, like MT8183, CPU and CCI share the same power
supplies. Cpufreq needs to check if CCI devfreq exists and wait until
CCI devfreq ready before scaling frequency.

Before CCI devfreq is ready, we record the voltage when booting to
kernel and use the max(cpu target voltage, booting voltage) to
prevent cpufreq adjust to the lower voltage which will cause the CCI
crash because of high frequency and low voltage.

- Add is_ccifreq_ready() to link CCI device to CPI, and CPU will start
  DVFS when CCI is ready.
- Add platform data for MT8183.

Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/mediatek-cpufreq.c