kernel-hacking-2024-linux-s.../drivers/clk/imx
Kevin Groeneveld 02d7bd1efb clk: imx: pll14xx: fix recalc_rate for negative kdiv
kdiv is a signed 16 bit value in the DEV_CTL1 register. Commit
53990cf9d5 ("clk: imx: pll14xx: consolidate rate calculation") changed
the kdiv variable from a short int to just int. When the value read from
the DIV_CTL1 register is assigned directly to an int the sign of the value
is lost resulting in incorrect results when the value is negative. Adding
a s16 cast to the register value fixes the issue.

Fixes: 53990cf9d5 ("clk: imx: pll14xx: consolidate rate calculation")
Signed-off-by: Kevin Groeneveld <kgroeneveld@lenbrook.com>
Link: https://lore.kernel.org/r/20221210203835.9714-1-kgroeneveld@lenbrook.com
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2023-02-21 09:34:36 -08:00
..
clk-busy.c
clk-composite-7ulp.c clk: imx: Fix the build break when clk-imx8ulp build as module 2021-10-01 10:15:42 +03:00
clk-composite-8m.c clk: imx8m: check mcore_booted before register clk 2022-04-12 13:47:03 +03:00
clk-composite-93.c clk: imx: clk-composite-93: check white_list 2022-09-19 13:06:45 +03:00
clk-cpu.c
clk-divider-gate.c
clk-fixup-div.c
clk-fixup-mux.c
clk-frac-pll.c
clk-fracn-gppll.c clk: imx: clk-fracn-gppll: Add more freq config for video pll 2022-06-16 17:28:59 +03:00
clk-gate-93.c clk: imx: add i.MX93 clk gate 2022-09-19 13:06:45 +03:00
clk-gate-exclusive.c
clk-gate2.c
clk-gpr-mux.c clk: imx: set imx_clk_gpr_mux_ops storage-class-specifier to static 2023-02-10 13:59:04 -08:00
clk-imx1.c
clk-imx5.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx6q.c clk: imx6q: add ethernet refclock mux support 2023-01-31 14:45:03 +02:00
clk-imx6sl.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx6sll.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx6sx.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx6ul.c clk: imx6ul: add ethernet refclock mux support 2023-01-31 14:45:17 +02:00
clk-imx7d.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx7ulp.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx8dxl-rsrc.c clk: imx: Add imx8dxl clk driver 2022-01-29 15:12:07 +02:00
clk-imx8mm.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx8mn.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx8mp.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx8mq.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx8qm-rsrc.c
clk-imx8qxp-lpcg.c clk: imx: off by one in imx_lpcg_parse_clks_from_dt() 2022-03-04 17:06:29 +02:00
clk-imx8qxp-lpcg.h
clk-imx8qxp-rsrc.c
clk-imx8qxp.c clk: imx: Add imx8dxl clk driver 2022-01-29 15:12:07 +02:00
clk-imx8ulp.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx25.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx27.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx31.c
clk-imx35.c clk: imx: remove clk_count of imx_register_uart_clocks 2023-01-29 20:29:29 +02:00
clk-imx93.c clk: imx: imx93: invoke imx_register_uart_clocks 2023-01-29 20:29:34 +02:00
clk-imxrt1050.c clk: imx: fix compile testing imxrt1050 2023-02-10 15:25:33 -08:00
clk-lpcg-scu.c
clk-pfd.c clk: imx: fix compile testing imxrt1050 2023-02-10 15:25:33 -08:00
clk-pfdv2.c clk: imx: Fix the build break when clk-imx8ulp build as module 2021-10-01 10:15:42 +03:00
clk-pll14xx.c clk: imx: pll14xx: fix recalc_rate for negative kdiv 2023-02-21 09:34:36 -08:00
clk-pllv1.c clk: imx: pllv1: fix kernel-doc notation for struct clk_pllv1 2021-12-02 17:26:40 -08:00
clk-pllv2.c
clk-pllv3.c clk: imx: fix compile testing imxrt1050 2023-02-10 15:25:33 -08:00
clk-pllv4.c clk: imx: Fix the build break when clk-imx8ulp build as module 2021-10-01 10:15:42 +03:00
clk-scu.c clk: imx: scu: fix memleak on platform_device_add() fails 2022-09-30 17:06:59 -07:00
clk-scu.h clk: imx: Add imx8dxl clk driver 2022-01-29 15:12:07 +02:00
clk-sscg-pll.c clk: imx: remove redundant re-assignment of pll->base 2022-03-09 10:39:25 -08:00
clk-vf610.c
clk.c clk: imx: add imx_obtain_fixed_of_clock() 2023-01-31 14:45:14 +02:00
clk.h clk: imx: add imx_obtain_fixed_of_clock() 2023-01-31 14:45:14 +02:00
Kconfig clk: imx: fix compile testing imxrt1050 2023-02-10 15:25:33 -08:00
Makefile clk: imx: add clk-gpr-mux driver 2023-01-31 14:45:01 +02:00