kernel_samsung_a53x/drivers/clk/qcom
Gabor Juhos ca185b2a86 clk: qcom: gcc-qcs404: fix initial rate of GPLL3
commit 36d202241d234fa4ac50743510d098ad52bd193a upstream.

The comment before the config of the GPLL3 PLL says that the
PLL should run at 930 MHz. In contrary to this, calculating
the frequency from the current configuration values by using
19.2 MHz as input frequency defined in 'qcs404.dtsi', it gives
921.6 MHz:

  $ xo=19200000; l=48; alpha=0x0; alpha_hi=0x0
  $ echo "$xo * ($((l)) + $(((alpha_hi << 32 | alpha) >> 8)) / 2^32)" | bc -l
  921600000.00000000000000000000

Set 'alpha_hi' in the configuration to a value used in downstream
kernels [1][2] in order to get the correct output rate:

  $ xo=19200000; l=48; alpha=0x0; alpha_hi=0x70
  $ echo "$xo * ($((l)) + $(((alpha_hi << 32 | alpha) >> 8)) / 2^32)" | bc -l
  930000000.00000000000000000000

The change is based on static code analysis, compile tested only.

[1] https://git.codelinaro.org/clo/la/kernel/msm-5.4/-/blob/kernel.lnx.5.4.r56-rel/drivers/clk/qcom/gcc-qcs404.c?ref_type=heads#L335
[2} https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/blob/kernel.lnx.5.15.r49-rel/drivers/clk/qcom/gcc-qcs404.c?ref_type=heads#L127

Cc: stable@vger.kernel.org
Fixes: 652f1813c113 ("clk: qcom: gcc: Add global clock controller driver for QCS404")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/r/20241022-fix-gcc-qcs404-gpll3-v1-1-c4d30d634d19@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
..
a53-pll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apcs-msm8916.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apss-ipq-pll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apss-ipq6018.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
camcc-sdm845.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-alpha-pll.c clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API 2024-11-23 23:21:00 +01:00
clk-alpha-pll.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-branch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-branch.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-cpu-8996.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-hfpll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-hfpll.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-krait.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-krait.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-pll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-pll.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-rcg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-rcg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-rcg2.c clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies 2024-11-18 11:42:53 +01:00
clk-regmap-divider.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-regmap-divider.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-regmap-mux-div.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-regmap-mux-div.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-regmap-mux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-regmap-mux.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-regmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-regmap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-rpm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-rpmh.c Revert "clk: qcom: clk-rpmh: Fix overflow in BCM vote" 2024-11-24 00:23:02 +01:00
clk-smd-rpm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk-spmi-pmic-div.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dispcc-sc7180.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dispcc-sdm845.c clk: qcom: dispcc-sdm845: Adjust internal GDSC wait times 2024-11-19 08:44:54 +01:00
dispcc-sm8250.c Revert "clk: qcom: dispcc-sm8250: use CLK_SET_RATE_PARENT for branch clocks" 2024-11-24 00:23:00 +01:00
gcc-apq8084.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-ipq806x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-ipq4019.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-ipq6018.c clk: qcom: gcc-ipq6018: fix terminating of frequency table arrays 2024-11-19 09:22:17 +01:00
gcc-ipq8074.c clk: qcom: gcc-ipq8074: fix terminating of frequency table arrays 2024-11-19 09:22:17 +01:00
gcc-mdm9615.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8660.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8916.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8939.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8960.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8974.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8994.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8996.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-msm8998.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-qcs404.c clk: qcom: gcc-qcs404: fix initial rate of GPLL3 2024-12-17 13:20:50 +01:00
gcc-sc7180.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-sdm660.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gcc-sdm845.c clk: qcom: gcc-sdm845: Add soft dependency on rpmhpd 2024-11-19 09:22:14 +01:00
gcc-sm8150.c clk: qcom: gcc-sm8150: Fix gcc_sdcc2_apps_clk_src 2024-11-18 11:42:53 +01:00
gcc-sm8250.c Revert "clk: qcom: gcc-sm8250: Do not turn off PCIe GDSCs during gdsc_disable()" 2024-11-24 00:23:02 +01:00
gdsc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gdsc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpucc-msm8998.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpucc-sc7180.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpucc-sdm845.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpucc-sm8150.c clk: qcom: gpucc-sm8150: Update the gpu_cc_pll1 config 2024-11-18 12:12:40 +01:00
gpucc-sm8250.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hfpll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig clk: qcom: config IPQ_APSS_6018 should depend on QCOM_SMEM 2024-11-18 11:42:54 +01:00
kpss-xcc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
krait-cc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lcc-ipq806x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lcc-mdm9615.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lcc-msm8960.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpasscc-sdm845.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpasscorecc-sc7180.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmcc-apq8084.c clk: qcom: mmcc-apq8084: fix terminating of frequency table arrays 2024-11-19 09:22:17 +01:00
mmcc-msm8960.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmcc-msm8974.c clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays 2024-11-19 09:22:17 +01:00
mmcc-msm8996.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmcc-msm8998.c clk: qcom: mmcc-msm8998: fix venus clock issue 2024-11-19 12:26:59 +01:00
mss-sc7180.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
q6sstop-qcs404.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reset.c clk: qcom: reset: Ensure write completion on reset de/assertion 2024-11-19 08:44:52 +01:00
reset.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
turingcc-qcs404.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
videocc-sc7180.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
videocc-sdm845.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
videocc-sm8150.c clk: qcom: videocc-sm8150: Add missing PLL config property 2024-11-18 12:12:42 +01:00
videocc-sm8250.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00