Skip to content
Commit e02bfea4 authored by Barnabás Czémán's avatar Barnabás Czémán Committed by Bjorn Andersson
Browse files

clk: qcom: clk-alpha-pll: Fix pll post div mask when width is not set



Many qcom clock drivers do not have .width set. In that case value of
(p)->width - 1 will be negative which breaks clock tree. Fix this
by checking if width is zero, and pass 3 to GENMASK if that's the case.

Fixes: 1c354114 ("clk: qcom: support for 2 bit PLL post divider")
Signed-off-by: default avatarBarnabás Czémán <barnabas.czeman@mainlining.org>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarChristopher Obbard <christopher.obbard@linaro.org>
Tested-by: default avatarChristopher Obbard <christopher.obbard@linaro.org>
Link: https://lore.kernel.org/r/20241006-fix-postdiv-mask-v3-1-160354980433@mainlining.org


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent f903663a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment