Files
linux/drivers
Nikita Travkin 0b9f2f2a04 clk: qcom: clk-rcg2: Make sure to not write d=0 to the NMD register
[ Upstream commit d0696770ce ]

Sometimes calculation of d value may result in 0 because of the
rounding after integer division. This causes the following error:

[  113.969689] camss_gp1_clk_src: rcg didn't update its configuration.
[  113.969754] WARNING: CPU: 3 PID: 35 at drivers/clk/qcom/clk-rcg2.c:122 update_config+0xc8/0xdc

Make sure that D value is never zero.

Fixes: 7f891faf59 ("clk: qcom: clk-rcg2: Add support for duty-cycle for RCG")
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220612145955.385787-3-nikita@trvn.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:23:47 +02:00
..
2022-08-17 14:23:11 +02:00
2022-08-17 14:23:13 +02:00
2021-11-18 19:16:08 +01:00
2022-08-17 14:23:45 +02:00
2022-04-13 20:59:01 +02:00
2022-08-17 14:23:16 +02:00
2021-12-22 09:32:39 +01:00