summaryrefslogtreecommitdiff
path: root/drivers/clk/samsung/clk-cpu.h
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2024-02-24 14:20:50 -0600
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-02-25 17:07:34 +0100
commit61f4399c74d0677ee64e42f7b8d4ab01ee39de45 (patch)
tree3fa19c6b8546fba642d74a122adb67233116f0f8 /drivers/clk/samsung/clk-cpu.h
parent152cc7478677dee6a11685585fd17efbce6e9db5 (diff)
clk: samsung: Add CPU clock support for Exynos850
Implement CPU clock control for Exynos850 SoC. It follows the same procedure which is already implemented for other SoCs in clk-cpu.c: 1. Set the correct rate for the alternate parent (if needed) before switching to use it as the CPU clock 2. Switch to the alternate parent, so the CPU continues to get clocked while the PLL is being re-configured 3. Adjust the dividers for the CPU related buses (ACLK, ATCLK, etc) 4. Re-configure the PLL for the new CPU clock rate. It's done automatically, as the CPU clock rate change propagates to the PLL clock, because the CPU clock has CLK_SET_RATE_PARENT flag set in exynos_register_cpu_clock() 5. Once the PLL is locked, set it back as the CPU clock source 6. Set alternate parent clock rate back to max speed As in already existing clk-cpu.c code, the divider and mux clocks are configured in a low-level fashion (using direct register access instead of CCF API), to avoid affecting how DIV and MUX clock flags are declared in the actual clock driver (clk-exynos850.c). No functional change. This patch adds support for Exynos850 CPU clock, but doesn't enable it per se. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Link: https://lore.kernel.org/r/20240224202053.25313-13-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/clk/samsung/clk-cpu.h')
-rw-r--r--drivers/clk/samsung/clk-cpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/clk/samsung/clk-cpu.h b/drivers/clk/samsung/clk-cpu.h
index 4382ab005ad3..892843611b0a 100644
--- a/drivers/clk/samsung/clk-cpu.h
+++ b/drivers/clk/samsung/clk-cpu.h
@@ -17,10 +17,14 @@
* enum exynos_cpuclk_layout - CPU clock registers layout compatibility
* @CPUCLK_LAYOUT_E4210: Exynos4210 compatible layout
* @CPUCLK_LAYOUT_E5433: Exynos5433 compatible layout
+ * @CPUCLK_LAYOUT_E850_CL0: Exynos850 cluster 0 compatible layout
+ * @CPUCLK_LAYOUT_E850_CL1: Exynos850 cluster 1 compatible layout
*/
enum exynos_cpuclk_layout {
CPUCLK_LAYOUT_E4210,
CPUCLK_LAYOUT_E5433,
+ CPUCLK_LAYOUT_E850_CL0,
+ CPUCLK_LAYOUT_E850_CL1,
};
/**