clk: samsung: Keep register offsets in chip specific structure
authorSam Protsenko <semen.protsenko@linaro.org>
Sat, 24 Feb 2024 20:20:48 +0000 (14:20 -0600)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 25 Feb 2024 16:06:17 +0000 (17:06 +0100)
commit78bc2312ef9cea4af1073dfab4c71d91b2015b5d
tree552578557c1ae9ede56015d92e16177b03aba828
parent9c746e5afdc3f784593c903d4be3d418f75d7787
clk: samsung: Keep register offsets in chip specific structure

Abstract CPU clock registers by keeping their offsets in a dedicated
chip specific structure to accommodate for oncoming Exynos850 support,
which has different offsets for cluster 0 and cluster 1. This rework
also makes it possible to use exynos_set_safe_div() for all chips, so
exynos5433_set_safe_div() is removed here to reduce the code
duplication. The ".regs" field has to be (void *) as different Exynos
chips can have very different register layout, so this way it's possible
for ".regs" to point to different structures, each representing its own
chip's layout.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20240224202053.25313-11-semen.protsenko@linaro.org
[krzysztof: drop redundant const for regs in exynos_cpuclk_chip]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
drivers/clk/samsung/clk-cpu.c