Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: qcom: clk-rpmh: Fix overflow in BCM vote

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>

authored by

Mike Tipton and committed by
Bjorn Andersson
a4e5af27 db30c116

+2
+2
drivers/clk/qcom/clk-rpmh.c
··· 263 263 cmd_state = 0; 264 264 } 265 265 266 + cmd_state = min(cmd_state, BCM_TCS_CMD_VOTE_MASK); 267 + 266 268 if (c->last_sent_aggr_state != cmd_state) { 267 269 cmd.addr = c->res_addr; 268 270 cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);