]> git.hungrycats.org Git - linux/commit
clk: qcom: clk-rpmh: Fix overflow in BCM vote
authorMike Tipton <quic_mdtipton@quicinc.com>
Fri, 9 Aug 2024 05:21:29 +0000 (10:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:01:00 +0000 (12:01 +0200)
commit58cdc0e79ece14aa0030002ff299cca192c5dc6a
tree32a6a4638f6768a9bce571f06ff063314d2e8f00
parent1127647741e4b93a3bd2cfe488954033a39f4287
clk: qcom: clk-rpmh: Fix overflow in BCM vote

commit a4e5af27e6f6a8b0d14bc0d7eb04f4a6c7291586 upstream.

Valid frequencies may result in BCM votes that exceed the max HW value.
Set vote ceiling to BCM_TCS_CMD_VOTE_MASK to ensure the votes aren't
truncated, which can result in lower frequencies than desired.

Fixes: 04053f4d23a4 ("clk: qcom: clk-rpmh: Add IPA clock support")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
Link: https://lore.kernel.org/r/20240809-clk-rpmh-bcm-vote-fix-v2-1-240c584b7ef9@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/qcom/clk-rpmh.c